From: Rohr, Stephan Date: Wed, 31 Jan 2024 14:33:37 +0000 (-0800) Subject: testsuite, threads: add missing return statements X-Git-Tag: gdb-16-branchpoint~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b574b26ac79171fc225e0d96de47ceb6f82430f2;p=thirdparty%2Fbinutils-gdb.git testsuite, threads: add missing return statements Add missing return statements in * gdb.threads/process-exit-status-is-leader-exit-status.c * gdb.threads/next-fork-exec-other-thread.c to fix 'no return statement' compiler warnings, e.g.: process-exit-status-is-leader-exit-status.c: In function ‘start’: process-exit-status-is-leader-exit-status.c:46:1: warning: no return statement in function returning non-void [-Wreturn-type] 46 | } | ^ Approved-By: Simon Marchi --- diff --git a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c index 0645b551e67..7694a894bef 100644 --- a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c +++ b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c @@ -50,6 +50,8 @@ worker_a (void *pArg) waitpid (pid, NULL, 0); usleep (5); } + + return NULL; } static void* @@ -61,6 +63,8 @@ worker_b (void *pArg) usleep (5); /* break here */ usleep (5); /* other line */ } + + return NULL; } int diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c index 3fed562bd86..bd998f990a1 100644 --- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c +++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c @@ -43,6 +43,7 @@ start (void *arg) int thread_return_value = *(int *) arg; do_exit (thread_return_value); + return NULL; } int