diff options
author | René Kjellerup <rk.katana.steel@gmail.com> | 2012-10-18 16:44:29 -0700 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-10-26 10:33:03 +0000 |
commit | 249a4da9cd5217b0c340edd779bd17e44e21d678 (patch) | |
tree | a1bc141a779ebaea3829ddbbcb4f00e5c727bf8b /dmake | |
parent | d795812415c2047045c75b4f65ec74541616ecc4 (diff) |
warn free build of dmake, concat-deps and lpsolve
add error handling for fread, fwrite, and fscanf calls
use "fputs" instead of "fprintf" to avoid warning that it couldn't varify
the format string because it wasn't a string literal.
Change-Id: I1137160d28461fbac69c8e05d32ba010da491c57
Reviewed-on: https://gerrit.libreoffice.org/903
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'dmake')
-rw-r--r-- | dmake/unix/arlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dmake/unix/arlib.c b/dmake/unix/arlib.c index b401245aad5e..708063f95885 100644 --- a/dmake/unix/arlib.c +++ b/dmake/unix/arlib.c @@ -290,15 +290,15 @@ struct ar_args *arg; #if ASCARCH #if defined(_AIX) - fread( (char *)&flhdr, sizeof(flhdr), 1, f ); + if( fread( (char *)&flhdr, sizeof(flhdr), 1, f ) != 1 ) return (-1); if( strncmp(flhdr.fl_magic,AIAMAG, SAIAMAG) != 0 ) return(-1); fseek(f, atol(flhdr.fl_fstmoff), 0 ); /* postition to first member */ #else - fread( magic, sizeof(magic), 1, f ); + if( fread( magic, sizeof(magic), 1, f ) != 1 ) return( -1 ); if( strncmp(magic, ARMAG, SARMAG) != 0 ) return( -1 ); #endif #else - fread( (char*)&word, sizeof(word), 1, f ); + if( fread( (char*)&word, sizeof(word), 1, f ) != 1 ) return( -1 ); if( word != ARMAG ) return( -1 ); #endif |