Add prototype for printf() and make type of "string" array be "char" in
authorNick Clifton <nickc@redhat.com>
Tue, 4 Jan 2005 10:13:02 +0000 (10:13 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 4 Jan 2005 10:13:02 +0000 (10:13 +0000)
order to avoid compile time warnings.

binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/testprog.c

index 66c3e5be70c39e250d76ad980bdc91784901ee6f..89f1e4d9e98eea654a5e4ba623d93ea1f4e4752e 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-04  Martin Koegler  <mkoegler@auto.tuwien.ac.at>
+
+       * binutils-all/testprog.c: Add prototype for printf() and make
+       type of "string" array be "char" in order to avoid compile time
+       warnings.
+
 2004-12-31  Alan Modra  <amodra@bigpond.net.au>
 
        * binutils-all/readelf.ss: Allow for both .rel and .rela sections.
index 2a347c887e82fbe27f8f06ad800fe66faffb5396..6ead98e721f08d2a8e20239b866d0826172b7ff6 100644 (file)
@@ -1,20 +1,21 @@
 /* This program is used to test objcopy, readelf and strip.  */
 
 extern int strcmp (char *, const char *);
+extern int printf (const char *, ...);
 
 int common;
 int global = 1;
 static int local = 2;
-static unsigned char string[] = "string";
+static char string[] = "string";
 
 int
-fn ()
+fn (void)
 {
   return 3;
 }
 
 int
-main ()
+main (void)
 {
   if (common != 0
       || global != 1
@@ -22,9 +23,9 @@ main ()
       || strcmp (string, "string") != 0)
     {
       printf ("failed\n");
-      return (1);
+      return 1;
     }
 
   printf ("ok\n");
-  return (0);
+  return 0;
 }
This page took 0.036425 seconds and 4 git commands to generate.