mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 05:05:32 +03:00
Tests: Fix -Wunreachable-code warnings from clang
This commit is contained in:
parent
1cdb12e920
commit
96666f3209
Notes:
sideshowbarker
2024-07-18 02:54:39 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/96666f3209a Pull-request: https://github.com/SerenityOS/serenity/pull/10399
@ -123,7 +123,6 @@ int main()
|
||||
hax = !hax;
|
||||
usleep(1);
|
||||
}
|
||||
return nullptr;
|
||||
},
|
||||
&writable_program_headers[0]);
|
||||
|
||||
@ -139,5 +138,4 @@ int main()
|
||||
printf("waitpid\n");
|
||||
waitpid(-1, nullptr, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -55,7 +55,6 @@ static void* yanker_fn(void* shared_)
|
||||
if (child_pid < 0) {
|
||||
printf("Yanker: Fork failed: %d\n", child_pid);
|
||||
pthread_exit(nullptr); // See below
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (child_pid > 0) {
|
||||
@ -63,7 +62,6 @@ static void* yanker_fn(void* shared_)
|
||||
// FIXME: LibPthread bug: returning during normal operation causes nullptr deref.
|
||||
// Workaround: Exit manually.
|
||||
pthread_exit(nullptr);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Give parent *thread* a moment to die.
|
||||
|
@ -22,7 +22,6 @@ int main(int, char**)
|
||||
printf("ST: close()\n");
|
||||
close(pipefds[1]);
|
||||
pthread_exit(nullptr);
|
||||
return nullptr;
|
||||
},
|
||||
nullptr);
|
||||
|
||||
|
@ -18,5 +18,4 @@ int main()
|
||||
for (;;) {
|
||||
chdir("/tmp/x");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ int main(int, char**)
|
||||
close(pipefds[0]);
|
||||
close(pipefds[1]);
|
||||
pthread_exit(nullptr);
|
||||
return nullptr;
|
||||
},
|
||||
nullptr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user