diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-09-29 01:11:29 -0700 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2007-10-11 00:30:06 +0200 |
commit | e30cb0ed72c2545ae873964b324a7f68211eb88f (patch) | |
tree | c605b55a4d45d1a20aace692c85f1cf4dfb73d55 /disk-utils/mkfs.minix.c | |
parent | 03f0d3e9f5ac49f73f70b6d48e497063cfa7a472 (diff) | |
download | util-linux-old-e30cb0ed72c2545ae873964b324a7f68211eb88f.tar.gz |
mkfs.minix: clean up gcc warnings
* clean up code, gcc warnings
(try compilation with "-Wall -Wp,-D_FORTIFY_SOURCE=2")
Builds cleanly on x86_32 and x86_64.
mkfs.minix.c:595: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/mkfs.minix.c')
-rw-r--r-- | disk-utils/mkfs.minix.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 8a81e7ca..7cd0958f 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -592,7 +592,10 @@ get_list_blocks(char *filename) { die(_("can't open file of bad blocks")); while (!feof(listfile)) { - fscanf(listfile,"%ld\n", &blockno); + if (fscanf(listfile,"%ld\n", &blockno) != 1) { + printf(_("badblock number input error on line %d\n"), badblocks + 1); + die(_("cannot read badblocks file")); + } mark_zone(blockno); badblocks++; } |