mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
Add printf format attributes & fix the warnings.
This commit is contained in:
parent
99b0e8fa66
commit
5bcf35a385
@ -126,14 +126,22 @@ typedef struct
|
||||
|
||||
/* global functions */
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(X)
|
||||
#endif
|
||||
|
||||
extern void *xmalloc (size_t size);
|
||||
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 );
|
||||
|
@ -173,7 +173,7 @@ void load_res16_file( const char *name )
|
||||
|
||||
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 */
|
||||
|
@ -216,7 +216,7 @@ int load_res32_file( const char *name )
|
||||
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user