From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24632 invoked by alias); 1 Oct 2009 15:21:24 -0000 Received: (qmail 24619 invoked by uid 22791); 1 Oct 2009 15:21:22 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Oct 2009 15:21:18 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n91FLEtA029400 for ; Thu, 1 Oct 2009 17:21:14 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n91FLE3F023479 for ; Thu, 1 Oct 2009 17:21:14 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n91FLE1v055930 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 1 Oct 2009 17:21:14 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: Subject: [RFA] fix some problems in testsuite Date: Thu, 01 Oct 2009 15:21:00 -0000 Message-ID: <005301ca42aa$dd7730d0$98659270$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00008.txt.bz2 While trying to test the release candidate on a ubuntu server i386-pc-linux a got several UNTESTED related to warnings issued by gcc. It seems that the installed version of gcc does generate warnings for format by default. See http://sourceware.org/ml/gdb/2009-10/msg00014.html This patch handles 1),2) and 6) problems in that email. Tested on compile farm gcc16, no changes there... (that gcc seems less picky). Is this OK? Pierre Muller Pascal language support maintainer for GDB gdb/testsuite ChangeLog entry: 2009-10-01 Pierre Muller * gdb.base/fileio.c (test_lseek): typecast off_t ret variable to long type. (test_unlink): Correct printf string. * gdb.base/checkpoint.c (main): Correct fprintf string for variable i. * gdb.threads/attachstop-mt.c: Add #include . Index: src/gdb/testsuite/gdb.base/fileio.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fileio.c,v retrieving revision 1.10 diff -u -p -r1.10 fileio.c --- src/gdb/testsuite/gdb.base/fileio.c 13 Jun 2006 08:55:22 -0000 1.10 +++ src/gdb/testsuite/gdb.base/fileio.c 1 Oct 2009 11:37:07 -0000 @@ -231,13 +231,13 @@ test_lseek () } else { - printf ("lseek 1: ret = %d, errno = %d %s\n", ret, errno, + printf ("lseek 1: ret = %ld, errno = %d %s\n", (long) ret, errno, strerrno (errno)); stop (); - printf ("lseek 2: ret = %d, errno = %d %s\n", ret, errno, + printf ("lseek 2: ret = %ld, errno = %d %s\n", (long) ret, errno, strerrno (errno)); stop (); - printf ("lseek 3: ret = %d, errno = %d %s\n", ret, errno, + printf ("lseek 3: ret = %ld, errno = %d %s\n", (long) ret, errno, strerrno (errno)); } /* Seeking on an invalid file descriptor */ @@ -473,7 +473,7 @@ test_unlink () strerrno (errno)); } else - printf ("unlink 2: ret = %d chmod failed\n", ret, errno); + printf ("unlink 2: ret = %d chmod failed, errno= %d\n", ret, errno); } else printf ("unlink 2: ret = %d, errno = %d\n", ret, errno); Index: src/gdb/testsuite/gdb.base/checkpoint.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/checkpoint.c,v retrieving revision 1.7 diff -u -p -r1.7 checkpoint.c --- src/gdb/testsuite/gdb.base/checkpoint.c 3 Jan 2009 05:58:03 -0000 1.7 +++ src/gdb/testsuite/gdb.base/checkpoint.c 1 Oct 2009 14:50:34 -0000 @@ -40,9 +40,9 @@ main() for (i = 0; ; i++) { if (ftell (in) != i) - fprintf (stderr, "Input error at %d\n", i); + fprintf (stderr, "Input error at %ld\n", i); if (ftell (out) != i) - fprintf (stderr, "Output error at %d\n", i); + fprintf (stderr, "Output error at %ld\n", i); c = fgetc (in); if (c == '\n') lines++; /* breakpoint 1 */ Index: src/gdb/testsuite/gdb.threads/attachstop-mt.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/attachstop-mt.c,v retrieving revision 1.2 diff -u -p -r1.2 attachstop-mt.c --- src/gdb/testsuite/gdb.threads/attachstop-mt.c 3 Jan 2009 05:58:07 -0000 1.2 +++ src/gdb/testsuite/gdb.threads/attachstop-mt.c 1 Oct 2009 14:50:49 -0000 @@ -21,6 +21,7 @@ #include #include #include +#include /* Red Hat BZ PR 197584.c */