diff options
author | Randy Dunlap | 2007-09-29 10:11:29 +0200 |
---|---|---|
committer | Karel Zak | 2007-10-11 00:30:06 +0200 |
commit | e30cb0ed72c2545ae873964b324a7f68211eb88f (patch) | |
tree | c605b55a4d45d1a20aace692c85f1cf4dfb73d55 | |
parent | swapon: clean up gcc warnings (diff) | |
download | kernel-qcow2-util-linux-e30cb0ed72c2545ae873964b324a7f68211eb88f.tar.gz kernel-qcow2-util-linux-e30cb0ed72c2545ae873964b324a7f68211eb88f.tar.xz kernel-qcow2-util-linux-e30cb0ed72c2545ae873964b324a7f68211eb88f.zip |
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>
-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 8a81e7cad..7cd0958fb 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++; } |