From patchwork Fri Nov 14 18:47:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 3746 Received: (qmail 2227 invoked by alias); 14 Nov 2014 18:47:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 2185 invoked by uid 89); 14 Nov 2014 18:47:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp11.uk.ibm.com Received: from e06smtp11.uk.ibm.com (HELO e06smtp11.uk.ibm.com) (195.75.94.107) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 14 Nov 2014 18:47:33 +0000 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Nov 2014 18:47:29 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 14 Nov 2014 18:47:27 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id E0FEA2190041 for ; Fri, 14 Nov 2014 18:47:00 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAEIlRGX57212932 for ; Fri, 14 Nov 2014 18:47:27 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAEDigV4025464 for ; Fri, 14 Nov 2014 08:44:42 -0500 Received: from br87z6lw.boeblingen.de.ibm.com (dyn-9-152-212-196.boeblingen.de.ibm.com [9.152.212.196]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAEDif2h025442 for ; Fri, 14 Nov 2014 08:44:42 -0500 From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH 3/3] GDB testsuite: More fixes for warnings with -std=gnu11 Date: Fri, 14 Nov 2014 19:47:26 +0100 Message-Id: <1415990846-9482-4-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1415990846-9482-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1415990846-9482-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14111418-0005-0000-0000-00000217BE59 X-IsSubscribed: yes Fix some more C compiler warnings for missing function return types and implicit function declarations in the GDB testsuite. gdb/testsuite/ChangeLog: * gdb.base/bp-permanent.c: Include unistd.h. * gdb.python/py-framefilter-mi.c (main): Add return type. * gdb.python/py-framefilter.c (main): Likewise. * gdb.trace/actions-changed.c (main): Likewise. --- gdb/testsuite/gdb.base/bp-permanent.c | 1 + gdb/testsuite/gdb.python/py-framefilter-mi.c | 3 ++- gdb/testsuite/gdb.python/py-framefilter.c | 3 ++- gdb/testsuite/gdb.trace/actions-changed.c | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/bp-permanent.c b/gdb/testsuite/gdb.base/bp-permanent.c index 53b3777..a45a922 100644 --- a/gdb/testsuite/gdb.base/bp-permanent.c +++ b/gdb/testsuite/gdb.base/bp-permanent.c @@ -18,6 +18,7 @@ #include #ifdef SIGNALS #include +#include #endif #define NOP asm("nop") diff --git a/gdb/testsuite/gdb.python/py-framefilter-mi.c b/gdb/testsuite/gdb.python/py-framefilter-mi.c index 242efa1..2955b71 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-mi.c +++ b/gdb/testsuite/gdb.python/py-framefilter-mi.c @@ -132,7 +132,8 @@ int func5(int f, int d) return i; } -main() +int main() { func5(3,5); + return 0; } diff --git a/gdb/testsuite/gdb.python/py-framefilter.c b/gdb/testsuite/gdb.python/py-framefilter.c index 80087c2..3102dda 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.c +++ b/gdb/testsuite/gdb.python/py-framefilter.c @@ -146,10 +146,11 @@ int func5(int f, int d) return i; } -main() +int main() { int z = 32; int y = 44; const char *foo1 = "Test"; func5(3,5); + return 0; } diff --git a/gdb/testsuite/gdb.trace/actions-changed.c b/gdb/testsuite/gdb.trace/actions-changed.c index 602e61a..b9df26b 100644 --- a/gdb/testsuite/gdb.trace/actions-changed.c +++ b/gdb/testsuite/gdb.trace/actions-changed.c @@ -42,6 +42,7 @@ subr (int parm) return busy; } +int main() { subr (1); @@ -63,4 +64,6 @@ main() subr (6); subr2 (6); end (6); + + return 0; }