summaryrefslogtreecommitdiffstats
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-01-04 10:13:02 +0000
committerNick Clifton <nickc@redhat.com>2005-01-04 10:13:02 +0000
commitc9bc3b3d292e520e750db3fd2214481712d29d9c (patch)
tree6e90707e8ef954d065e21540c94ef6deea767a28 /binutils
parent196e80401820dbe339f14ba540db899d907680d8 (diff)
downloadppe42-binutils-c9bc3b3d292e520e750db3fd2214481712d29d9c.tar.gz
ppe42-binutils-c9bc3b3d292e520e750db3fd2214481712d29d9c.zip
Add prototype for printf() and make type of "string" array be "char" in
order to avoid compile time warnings.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog6
-rw-r--r--binutils/testsuite/binutils-all/testprog.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 66c3e5be70..89f1e4d9e9 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -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.
diff --git a/binutils/testsuite/binutils-all/testprog.c b/binutils/testsuite/binutils-all/testprog.c
index 2a347c887e..6ead98e721 100644
--- a/binutils/testsuite/binutils-all/testprog.c
+++ b/binutils/testsuite/binutils-all/testprog.c
@@ -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;
}
OpenPOWER on IntegriCloud