Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] fix some problems in testsuite
@ 2009-10-01 15:21 Pierre Muller
  2009-10-01 15:28 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Muller @ 2009-10-01 15:21 UTC (permalink / raw)
  To: gdb-patches

  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 */
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] fix some problems in testsuite
  2009-10-01 15:21 [RFA] fix some problems in testsuite Pierre Muller
@ 2009-10-01 15:28 ` Pedro Alves
  2009-10-01 15:41   ` Pierre Muller
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2009-10-01 15:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pierre Muller

On Thursday 01 October 2009 16:21:35, Pierre Muller wrote:

> Is this OK?

Yes, thanks.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [RFA] fix some problems in testsuite
  2009-10-01 15:28 ` Pedro Alves
@ 2009-10-01 15:41   ` Pierre Muller
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Muller @ 2009-10-01 15:41 UTC (permalink / raw)
  To: 'Pedro Alves', gdb-patches

> > Is this OK?
> 
> Yes, thanks.

Change committed.


Pierre Muller
Pascal language support maintainer for GDB





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-01 15:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-01 15:21 [RFA] fix some problems in testsuite Pierre Muller
2009-10-01 15:28 ` Pedro Alves
2009-10-01 15:41   ` Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox