summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-10-08 08:35:04 -0400
committerAndreas Kling <kling@serenityos.org>2021-10-08 23:33:46 +0200
commitf46a40a471d38dd7c81a7420048d7885f42a97ef (patch)
treee5615c717e5a57da0825f228f59b99ff3f287329 /Userland
parentb8dc3661ac7573351c42275068abbe6bc2d4e6aa (diff)
downloadserenity-f46a40a471d38dd7c81a7420048d7885f42a97ef.zip
Utilities: Fix -Wunreachable-code warnings from clang
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/fgrep.cpp1
-rw-r--r--Userland/Utilities/ping.cpp2
-rw-r--r--Userland/Utilities/strace.cpp2
-rw-r--r--Userland/Utilities/top.cpp1
-rw-r--r--Userland/Utilities/tt.cpp10
-rw-r--r--Userland/Utilities/yes.cpp1
6 files changed, 0 insertions, 17 deletions
diff --git a/Userland/Utilities/fgrep.cpp b/Userland/Utilities/fgrep.cpp
index 639533ac8b..cdbbd7bbd9 100644
--- a/Userland/Utilities/fgrep.cpp
+++ b/Userland/Utilities/fgrep.cpp
@@ -25,5 +25,4 @@ int main(int argc, char** argv)
return 0;
VERIFY(str);
}
- return 0;
}
diff --git a/Userland/Utilities/ping.cpp b/Userland/Utilities/ping.cpp
index 1ff6080795..43848be6de 100644
--- a/Userland/Utilities/ping.cpp
+++ b/Userland/Utilities/ping.cpp
@@ -225,6 +225,4 @@ int main(int argc, char** argv)
sleep(1);
}
-
- return 0;
}
diff --git a/Userland/Utilities/strace.cpp b/Userland/Utilities/strace.cpp
index c605547a5d..a57d6cdfd0 100644
--- a/Userland/Utilities/strace.cpp
+++ b/Userland/Utilities/strace.cpp
@@ -790,6 +790,4 @@ int main(int argc, char** argv)
return 1;
}
}
-
- return 0;
}
diff --git a/Userland/Utilities/top.cpp b/Userland/Utilities/top.cpp
index 7e333eefaf..8630deed19 100644
--- a/Userland/Utilities/top.cpp
+++ b/Userland/Utilities/top.cpp
@@ -297,5 +297,4 @@ int main(int argc, char** argv)
prev = move(current);
sleep(top_option.delay_time);
}
- return 0;
}
diff --git a/Userland/Utilities/tt.cpp b/Userland/Utilities/tt.cpp
index 49bbc66323..574bd140e9 100644
--- a/Userland/Utilities/tt.cpp
+++ b/Userland/Utilities/tt.cpp
@@ -58,7 +58,6 @@ int main(int argc, char** argv)
&thread_id, nullptr, [](void*) -> void* {
outln("Hi there, from the second thread!");
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -96,8 +95,6 @@ int mutex_test()
pthread_mutex_unlock(&mutex);
sleep(1);
}
- pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -110,7 +107,6 @@ int mutex_test()
pthread_mutex_unlock(&mutex);
usleep(10000);
}
- return 0;
}
int detached_test()
@@ -144,7 +140,6 @@ int detached_test()
outln("I'm the secondary thread :^)");
sleep(1);
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc != 0) {
@@ -206,7 +201,6 @@ int priority_test()
outln("I'm the secondary thread :^)");
sleep(1);
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -260,7 +254,6 @@ int stack_size_test()
outln("I'm the secondary thread :^)");
sleep(1);
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -294,7 +287,6 @@ int staying_alive_test()
sleep(3520);
outln("Secondary thread exiting");
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -354,7 +346,6 @@ int set_stack_test()
outln("I'm the secondary thread :^)");
sleep(1);
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
@@ -386,7 +377,6 @@ int kill_test()
sleep(100);
outln("Secondary thread is still alive :^(");
pthread_exit((void*)0xDEADBEEF);
- return nullptr;
},
nullptr);
if (rc < 0) {
diff --git a/Userland/Utilities/yes.cpp b/Userland/Utilities/yes.cpp
index 7f5d2f6e48..fab0428428 100644
--- a/Userland/Utilities/yes.cpp
+++ b/Userland/Utilities/yes.cpp
@@ -23,5 +23,4 @@ int main(int argc, char** argv)
for (;;)
puts(string);
- return 0;
}