]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite, threads: add missing return statements
authorRohr, Stephan <stephan.rohr@intel.com>
Wed, 31 Jan 2024 14:33:37 +0000 (06:33 -0800)
committerStephan Rohr <stephan.rohr@intel.com>
Mon, 2 Dec 2024 08:24:19 +0000 (00:24 -0800)
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 <simon.marchi@efficios.com>
gdb/testsuite/gdb.threads/next-fork-exec-other-thread.c
gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.c

index 0645b551e6787f201cf18d75a03ca8bc03751671..7694a894befa4e952525c7a05dbd5b54594825f1 100644 (file)
@@ -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
index 3fed562bd868b5ab847f5407695c01bc2c91ed39..bd998f990a1372147733408f38c57c021b7ad608 100644 (file)
@@ -43,6 +43,7 @@ start (void *arg)
   int thread_return_value = *(int *) arg;
 
   do_exit (thread_return_value);
+  return NULL;
 }
 
 int