* gdb.base/fileio.c (test_lseek): typecast ofs_t ret variable to
authorPierre Muller <muller@sourceware.org>
Thu, 1 Oct 2009 15:39:13 +0000 (15:39 +0000)
committerPierre Muller <muller@sourceware.org>
Thu, 1 Oct 2009 15:39:13 +0000 (15:39 +0000)
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>.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/checkpoint.c
gdb/testsuite/gdb.base/fileio.c
gdb/testsuite/gdb.threads/attachstop-mt.c

index 7297f0c..1ab8411 100644 (file)
@@ -1,3 +1,11 @@
+2009-10-01  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * gdb.base/fileio.c (test_lseek): typecast ofs_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>.
+
 2009-09-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * gdb.base/breakpoint-shadow.exp: Move the ia64 part into ...
index 4a41268..2d44a74 100644 (file)
@@ -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 3910da5..329522f 100644 (file)
@@ -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 fa77c9a..061411a 100644 (file)
@@ -21,6 +21,7 @@
 #include <unistd.h>
 #include <pthread.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Red Hat BZ PR 197584.c */