This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix GCC 4.0 warnings in testsuite
- From: Martin Koegler <mkoegler at auto dot tuwien dot ac dot at>
- To: binutils at sources dot redhat dot com
- Date: Sun, 26 Dec 2004 14:05:15 +0100
- Subject: [PATCH] Fix GCC 4.0 warnings in testsuite
If the testsuite for the binutils is run with gcc 4.0
(GNU C version 4.0.0 20041207 (experimental) (i686-pc-linux-gnu)),
compiling testprog.c results in the following warnings:
testprog.c:22: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
testprog.c:24: warning: incompatible implicit declaration of built-in function 'printf'
testprog.c:28: warning: incompatible implicit declaration of built-in function 'printf'
This warnings cause some tests, which use testprog.c, to be skipped.
The following patch adds a prototype for printf to remove the printf-warnings and
removes the unsigned attribute of string[] to remove the second warning.
Can it be applied to the CVS?
Index: binutils/testsuite/binutils-all/testprog.c
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/testprog.c,v
retrieving revision 1.4
diff -u -r1.4 testprog.c
--- binutils/testsuite/binutils-all/testprog.c 23 Apr 2003 17:36:08 -0000 1.4
+++ binutils/testsuite/binutils-all/testprog.c 25 Dec 2004 20:57:27 -0000
@@ -1,11 +1,12 @@
/* This program is used to test objcopy, readelf and strip. */
extern int strcmp (char *, const char *);
+extern int printf (const char* format,...);
int common;
int global = 1;
static int local = 2;
-static unsigned char string[] = "string";
+static char string[] = "string";
int
fn ()
mfg Martin Kögler
e9925248@stud4.tuwien.ac.at