[winebuild01] Add format printf attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
	Add printf format attributes & fix the warnings
diff -u -r tools/winebuild.0/build.h tools/winebuild/build.h
--- tools/winebuild.0/build.h	2003-09-18 12:26:10.000000000 +0100
+++ tools/winebuild/build.h	2003-09-18 12:24:05.000000000 +0100
@@ -130,10 +130,14 @@
 extern void *xrealloc (void *ptr, size_t size);
 extern char *xstrdup( const char *str );
 extern char *strupper(char *s);
-extern void fatal_error( const char *msg, ... );
-extern void fatal_perror( const char *msg, ... );
-extern void error( const char *msg, ... );
-extern void warning( const char *msg, ... );
+extern void fatal_error( const char *msg, ... )
+   __attribute__ ((__format__ (__printf__, 1, 2)));
+extern void fatal_perror( const char *msg, ... )
+   __attribute__ ((__format__ (__printf__, 1, 2)));
+extern void error( const char *msg, ... )
+   __attribute__ ((__format__ (__printf__, 1, 2)));
+extern void warning( const char *msg, ... )
+   __attribute__ ((__format__ (__printf__, 1, 2)));
 extern void output_standard_file_header( FILE *outfile );
 extern FILE *open_input_file( const char *srcdir, const char *name );
 extern void close_input_file( FILE *file );
diff -u -r tools/winebuild.0/res16.c tools/winebuild/res16.c
--- tools/winebuild.0/res16.c	2003-09-08 11:25:20.000000000 +0100
+++ tools/winebuild/res16.c	2003-09-18 12:17:32.000000000 +0100
@@ -173,7 +173,7 @@
 
     if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
     if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
-    if (!st.st_size) fatal_error( "%s is an empty file\n" );
+    if (!st.st_size) fatal_error( "%s is an empty file\n", name );
 #ifdef	HAVE_MMAP
     if ((base = mmap( NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0 )) == (void*)-1)
 #endif	/* HAVE_MMAP */
diff -u -r tools/winebuild.0/res32.c tools/winebuild/res32.c
--- tools/winebuild.0/res32.c	2003-09-08 11:25:20.000000000 +0100
+++ tools/winebuild/res32.c	2003-09-18 12:17:43.000000000 +0100
@@ -216,7 +216,7 @@
 
     if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
     if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
-    if (!st.st_size) fatal_error( "%s is an empty file\n" );
+    if (!st.st_size) fatal_error( "%s is an empty file\n", name );
 #ifdef	HAVE_MMAP
     if ((base = mmap( NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0 )) == (void*)-1)
 #endif	/* HAVE_MMAP */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux