* [patch] add return values to return statements in non-void functions
@ 2014-04-12 0:24 David Blaikie
2014-04-14 13:03 ` Joel Brobecker
2014-04-24 0:23 ` Doug Evans
0 siblings, 2 replies; 7+ messages in thread
From: David Blaikie @ 2014-04-12 0:24 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
These missing return values cause build breaks with clang which
defaults the -Wreturn-type warning to an error in this case.
Add the right return values so these tests can run when using clang.
[-- Attachment #2: missing_return_value.diff --]
[-- Type: text/plain, Size: 1643 bytes --]
commit ce1534e51863af5d935cdc63c44df0fa64a46653
Author: David Blaikie <dblaikie@gmail.com>
Date: Fri Apr 11 17:20:49 2014 -0700
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.
diff --git gdb/testsuite/ChangeLog gdb/testsuite/ChangeLog
index 12ed4f9..1b26439 100644
--- gdb/testsuite/ChangeLog
+++ gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-10 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-10 Pedro Alves <palves@redhat.com>
* gdb.base/cond-eval-mode.c: New file.
diff --git gdb/testsuite/gdb.mi/non-stop.c gdb/testsuite/gdb.mi/non-stop.c
index f03180e..67b68aa 100644
--- gdb/testsuite/gdb.mi/non-stop.c
+++ 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 gdb/testsuite/gdb.threads/staticthreads.c gdb/testsuite/gdb.threads/staticthreads.c
index f98f4f1..e834d7f 100644
--- gdb/testsuite/gdb.threads/staticthreads.c
+++ 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;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-12 0:24 [patch] add return values to return statements in non-void functions David Blaikie
@ 2014-04-14 13:03 ` Joel Brobecker
2014-04-14 15:38 ` David Blaikie
2014-04-24 0:23 ` Doug Evans
1 sibling, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2014-04-14 13:03 UTC (permalink / raw)
To: David Blaikie; +Cc: gdb-patches
> gdb/testsuite/
>
> * gdb.mi/non-stop.c: Add return value for non-void function return
> statement.
> * gdb.threads/staticthreads.c: Ditto.
Looks good, thanks for doing that. Please apply.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-14 13:03 ` Joel Brobecker
@ 2014-04-14 15:38 ` David Blaikie
0 siblings, 0 replies; 7+ messages in thread
From: David Blaikie @ 2014-04-14 15:38 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Mon, Apr 14, 2014 at 6:03 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> gdb/testsuite/
>>
>> * gdb.mi/non-stop.c: Add return value for non-void function return
>> statement.
>> * gdb.threads/staticthreads.c: Ditto.
>
> Looks good, thanks for doing that. Please apply.
Thanks, committed as 41f1ada5d2d4cff7a235644661ec30de156fd038
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-12 0:24 [patch] add return values to return statements in non-void functions David Blaikie
2014-04-14 13:03 ` Joel Brobecker
@ 2014-04-24 0:23 ` Doug Evans
2014-04-24 0:30 ` Doug Evans
1 sibling, 1 reply; 7+ messages in thread
From: Doug Evans @ 2014-04-24 0:23 UTC (permalink / raw)
To: David Blaikie; +Cc: gdb-patches
David Blaikie writes:
> These missing return values cause build breaks with clang which
> defaults the -Wreturn-type warning to an error in this case.
>
> Add the right return values so these tests can run when using clang.
> commit ce1534e51863af5d935cdc63c44df0fa64a46653
> Author: David Blaikie <dblaikie@gmail.com>
> Date: Fri Apr 11 17:20:49 2014 -0700
>
> 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.
ChangeLog rules require being more specific about where the change happened.
E.g.,
* gdb.mi/non-stop.c (worker): Add return value for non-void function
return statement.
* gdb.threads/staticthreads.c (thread_function): Ditto.
Ok with those changes.
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-24 0:23 ` Doug Evans
@ 2014-04-24 0:30 ` Doug Evans
2014-04-24 20:26 ` David Blaikie
0 siblings, 1 reply; 7+ messages in thread
From: Doug Evans @ 2014-04-24 0:30 UTC (permalink / raw)
To: David Blaikie; +Cc: gdb-patches
On Wed, Apr 23, 2014 at 5:23 PM, Doug Evans <dje@google.com> wrote:
> David Blaikie writes:
> > These missing return values cause build breaks with clang which
> > defaults the -Wreturn-type warning to an error in this case.
> >
> > Add the right return values so these tests can run when using clang.
> > commit ce1534e51863af5d935cdc63c44df0fa64a46653
> > Author: David Blaikie <dblaikie@gmail.com>
> > Date: Fri Apr 11 17:20:49 2014 -0700
> >
> > 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.
>
> ChangeLog rules require being more specific about where the change happened.
> E.g.,
>
> * gdb.mi/non-stop.c (worker): Add return value for non-void function
> return statement.
> * gdb.threads/staticthreads.c (thread_function): Ditto.
>
> Ok with those changes.
> Thanks!
Bleah. Missed that this one was also already approved.
[that's what I get for switching back and forth between mail readers]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-24 0:30 ` Doug Evans
@ 2014-04-24 20:26 ` David Blaikie
2014-04-24 20:32 ` Doug Evans
0 siblings, 1 reply; 7+ messages in thread
From: David Blaikie @ 2014-04-24 20:26 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Wed, Apr 23, 2014 at 5:30 PM, Doug Evans <dje@google.com> wrote:
> On Wed, Apr 23, 2014 at 5:23 PM, Doug Evans <dje@google.com> wrote:
>> David Blaikie writes:
>> > These missing return values cause build breaks with clang which
>> > defaults the -Wreturn-type warning to an error in this case.
>> >
>> > Add the right return values so these tests can run when using clang.
>> > commit ce1534e51863af5d935cdc63c44df0fa64a46653
>> > Author: David Blaikie <dblaikie@gmail.com>
>> > Date: Fri Apr 11 17:20:49 2014 -0700
>> >
>> > 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.
>>
>> ChangeLog rules require being more specific about where the change happened.
>> E.g.,
>>
>> * gdb.mi/non-stop.c (worker): Add return value for non-void function
>> return statement.
>> * gdb.threads/staticthreads.c (thread_function): Ditto.
>>
>> Ok with those changes.
>> Thanks!
>
> Bleah. Missed that this one was also already approved.
> [that's what I get for switching back and forth between mail readers]
No worries - I'll try to keep that in mind for future ChangeLogs. (I
assume it's preferred not to go back and fix the ChangeLog that was
already committed in this instance)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] add return values to return statements in non-void functions
2014-04-24 20:26 ` David Blaikie
@ 2014-04-24 20:32 ` Doug Evans
0 siblings, 0 replies; 7+ messages in thread
From: Doug Evans @ 2014-04-24 20:32 UTC (permalink / raw)
To: David Blaikie; +Cc: gdb-patches
On Thu, Apr 24, 2014 at 1:26 PM, David Blaikie <dblaikie@gmail.com> wrote:
>> Bleah. Missed that this one was also already approved.
>> [that's what I get for switching back and forth between mail readers]
>
> No worries - I'll try to keep that in mind for future ChangeLogs. (I
> assume it's preferred not to go back and fix the ChangeLog that was
> already committed in this instance)
Ok by me to leave it as is.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-24 20:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-12 0:24 [patch] add return values to return statements in non-void functions David Blaikie
2014-04-14 13:03 ` Joel Brobecker
2014-04-14 15:38 ` David Blaikie
2014-04-24 0:23 ` Doug Evans
2014-04-24 0:30 ` Doug Evans
2014-04-24 20:26 ` David Blaikie
2014-04-24 20:32 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox