PATCH: makedep warning
Marcus Meissner
marcus at jet.franken.de
Sat Apr 8 03:21:08 CDT 2006
Hi,
glibc 2.4 + FS=2 makes it warn on ftruncate result
handling. The result cannot be -1 actually, but
check for it anyway.
Ciao, Marcus
Changelog:
Check result of ftruncate().
Index: tools/makedep.c
===================================================================
RCS file: /home/wine/wine/tools/makedep.c,v
retrieving revision 1.19
diff -u -r1.19 makedep.c
--- tools/makedep.c 28 Sep 2005 18:17:08 -0000 1.19
+++ tools/makedep.c 8 Apr 2006 08:19:54 -0000
@@ -493,7 +493,8 @@
{
while (fgets( buffer, sizeof(buffer), file ))
if (!strncmp( buffer, Separator, strlen(Separator) )) break;
- ftruncate( fileno(file), ftell(file) );
+ if (-1 == ftruncate( fileno(file), ftell(file) ))
+ perror("ftruncate");
fseek( file, 0L, SEEK_END );
}
if (!file)
More information about the wine-patches
mailing list