[PATCH] Fix GCC 4.0 warnings in testsuite

Nick Clifton nickc@redhat.com
Tue Jan 4 10:14:00 GMT 2005


Hi Martin,

> 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 ()

Thanks for submitting this patch.  I have applied it to the CVS sources 
along with this ChangeLog entry:

binutils/testsuite/ChangeLog
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.

Cheers
   Nick




More information about the Binutils mailing list