Skip to content

Commit

Permalink
Utilities: Fix -Wunreachable-code warnings from clang
Browse files Browse the repository at this point in the history
  • Loading branch information
nico authored and awesomekling committed Oct 8, 2021
1 parent b8dc366 commit f46a40a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion Userland/Utilities/fgrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ int main(int argc, char** argv)
return 0;
VERIFY(str);
}
return 0;
}
2 changes: 0 additions & 2 deletions Userland/Utilities/ping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,4 @@ int main(int argc, char** argv)

sleep(1);
}

return 0;
}
2 changes: 0 additions & 2 deletions Userland/Utilities/strace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,4 @@ int main(int argc, char** argv)
return 1;
}
}

return 0;
}
1 change: 0 additions & 1 deletion Userland/Utilities/top.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,4 @@ int main(int argc, char** argv)
prev = move(current);
sleep(top_option.delay_time);
}
return 0;
}
10 changes: 0 additions & 10 deletions Userland/Utilities/tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -96,8 +95,6 @@ int mutex_test()
pthread_mutex_unlock(&mutex);
sleep(1);
}
pthread_exit((void*)0xDEADBEEF);
return nullptr;
},
nullptr);
if (rc < 0) {
Expand All @@ -110,7 +107,6 @@ int mutex_test()
pthread_mutex_unlock(&mutex);
usleep(10000);
}
return 0;
}

int detached_test()
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -294,7 +287,6 @@ int staying_alive_test()
sleep(3520);
outln("Secondary thread exiting");
pthread_exit((void*)0xDEADBEEF);
return nullptr;
},
nullptr);
if (rc < 0) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion Userland/Utilities/yes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ int main(int argc, char** argv)

for (;;)
puts(string);
return 0;
}

0 comments on commit f46a40a

Please sign in to comment.