From 41f1ada5d2d4cff7a235644661ec30de156fd038 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 11 Apr 2014 17:20:49 -0700 Subject: [PATCH] Add return value for non-void function return statements to fix error in clang build. 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 | 6 ++++++ gdb/testsuite/gdb.mi/non-stop.c | 2 +- gdb/testsuite/gdb.threads/staticthreads.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 730c116cefd..2e9024ffcae 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-04-14 David Blaikie + + * 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 Doug Evans diff --git a/gdb/testsuite/gdb.mi/non-stop.c b/gdb/testsuite/gdb.mi/non-stop.c index f03180e3a8f..67b68aaaa6e 100644 --- a/gdb/testsuite/gdb.mi/non-stop.c +++ b/gdb/testsuite/gdb.mi/non-stop.c @@ -56,7 +56,7 @@ worker (void *arg) unslept = sleep (unslept); if (exit_first_thread && id == 0) - return; + return NULL; break_at_me (id, i); } diff --git a/gdb/testsuite/gdb.threads/staticthreads.c b/gdb/testsuite/gdb.threads/staticthreads.c index f98f4f1d8f6..e834d7f4655 100644 --- a/gdb/testsuite/gdb.threads/staticthreads.c +++ b/gdb/testsuite/gdb.threads/staticthreads.c @@ -37,7 +37,7 @@ thread_function (void *arg) if (errno != EINTR) { perror ("thread_function"); - return; + return NULL; } } return NULL; -- 2.30.2