Add return value for non-void function return statements to fix error in clang build.
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 12 Apr 2014 00:20:49 +0000 (17:20 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 14 Apr 2014 15:34:51 +0000 (08:34 -0700)
Clang defaults this warning to an error, breaking the build & causing
these tests not to run.

gdb/testsuite/

* gdb.mi/non-stop.c: Add return value for non-void function return
statement.
* gdb.threads/staticthreads.c: Ditto.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/non-stop.c
gdb/testsuite/gdb.threads/staticthreads.c

index 730c116cefd42de9f9c39b0fb90c2c2712776843..2e9024ffcae13e53fac527aa557558fb489fbad4 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-14  David Blaikie <dblaikie@gmail.com>
+
+       * gdb.mi/non-stop.c: Add return value for non-void function return
+       statement.
+       * gdb.threads/staticthreads.c: Ditto.
+
 2014-04-12  Siva Chandra Reddy  <sivachandra@google.com>
            Doug Evans  <xdje42@gmail.com>
 
index f03180e3a8fb94cc2fbaf149c7c108069635bc37..67b68aaaa6ed023a2f744f35d05634e6e09009b7 100644 (file)
@@ -56,7 +56,7 @@ worker (void *arg)
        unslept = sleep (unslept);
 
       if (exit_first_thread && id == 0)
-       return;
+       return NULL;
 
       break_at_me (id, i);
     }
index f98f4f1d8f621be60642e7307c47b573d6bf2d0e..e834d7f465562e8efcb4a3a041ba3d5d9c289570 100644 (file)
@@ -37,7 +37,7 @@ thread_function (void *arg)
       if (errno != EINTR)
        {
          perror ("thread_function");
-         return;
+         return NULL;
        }
     }
   return NULL;