Message ID | CAENS6Ev9CdJBUt9JaFtsroSD=gC3OfnHFYBdd=hPENWGCxv8SA@mail.gmail.com |
---|---|
State | Committed |
Headers |
Return-Path: <x14314964@homiemail-mx20.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 06811360060 for <siddhesh@wilcox.dreamhost.com>; Fri, 11 Apr 2014 17:24:29 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id A53E740FCC641; Fri, 11 Apr 2014 17:24:29 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 7FB4040FCC658 for <gdb@patchwork.siddhesh.in>; Fri, 11 Apr 2014 17:24:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=Kqz/c8/5VRazq/ZyLbIL4Pm+LIT/y EcQVF1vEm6Y0U9hig9NOgnFBFWcutuwy+K5DctGgKSpSNPyRJ8qf63rPxU5FOQ8M 5C+iI7tYNRQSgfELuhBPttYZXYql6JUvPyp7XFh46Y2bsjqehT1F9zSmTzq/snV8 GO688i3wVyB6Ek= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=Sc5KuwqwrVKrpzNs+3yGOtheLcU=; b=Un8 jS+qP/kAkCCDJmrKnhRt1pEyW/kTUzvXek90hak663BVNJoVR527CovAbek24iMf V/rA9JNL/uFoIWJDFlpWWaqKQ2wjgeNDdeSQhO8HpBdtu9OG9QSE2uV2OOYB9sf1 g7FYT4Ed+U7uPeC8yNBO8NS91ZetvX5ytJlxMKrU= Received: (qmail 27649 invoked by alias); 12 Apr 2014 00:24:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-gdb=patchwork.siddhesh.in@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27636 invoked by uid 89); 12 Apr 2014 00:24:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f176.google.com Received: from mail-qc0-f176.google.com (HELO mail-qc0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 12 Apr 2014 00:24:23 +0000 Received: by mail-qc0-f176.google.com with SMTP id m20so6626374qcx.7 for <gdb-patches@sourceware.org>; Fri, 11 Apr 2014 17:24:21 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.229.179.65 with SMTP id bp1mr33691969qcb.11.1397262260893; Fri, 11 Apr 2014 17:24:20 -0700 (PDT) Received: by 10.140.30.74 with HTTP; Fri, 11 Apr 2014 17:24:20 -0700 (PDT) Date: Fri, 11 Apr 2014 17:24:20 -0700 Message-ID: <CAENS6Ev9CdJBUt9JaFtsroSD=gC3OfnHFYBdd=hPENWGCxv8SA@mail.gmail.com> Subject: [patch] add return values to return statements in non-void functions From: David Blaikie <dblaikie@gmail.com> To: gdb-patches <gdb-patches@sourceware.org> Content-Type: multipart/mixed; boundary=001a11c2c10ab8165304f6cd78a1 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in |
Commit Message
David Blaikie
April 12, 2014, 12:24 a.m. UTC
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.
Comments
> 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.
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
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!
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]
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)
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.
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;