summaryrefslogtreecommitdiff
path: root/binutils/testsuite/binutils-all/testprog.c
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
commit141affd154a846512ae576f28f3940ef49f11bcd (patch)
treeb4038fe49365f65cb88160cac37660c7a0969eb7 /binutils/testsuite/binutils-all/testprog.c
parentf88eb4e335faedb0fdf2a709bf9cddf5b360f105 (diff)
downloadbinutils-redhat-141affd154a846512ae576f28f3940ef49f11bcd.tar.gz
Add prototype for printf() and make type of "string" array be "char" in
order to avoid compile time warnings.
Diffstat (limited to 'binutils/testsuite/binutils-all/testprog.c')
-rw-r--r--binutils/testsuite/binutils-all/testprog.c11
1 files changed, 6 insertions, 5 deletions
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;
}