From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] fix some problems in testsuite
Date: Thu, 01 Oct 2009 15:21:00 -0000 [thread overview]
Message-ID: <005301ca42aa$dd7730d0$98659270$@u-strasbg.fr> (raw)
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 <muller@ics.u-strasbg.fr>
* 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 <string.h>.
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 <unistd.h>
#include <pthread.h>
#include <stdio.h>
+#include <string.h>
/* Red Hat BZ PR 197584.c */
next reply other threads:[~2009-10-01 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 15:21 Pierre Muller [this message]
2009-10-01 15:28 ` Pedro Alves
2009-10-01 15:41 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005301ca42aa$dd7730d0$98659270$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox