mtd: fix 2 compiler warnings
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 26 Nov 2014 08:59:17 +0000 (08:59 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 26 Nov 2014 08:59:17 +0000 (08:59 +0000)
mtd.c:544:7: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ssize_t’ [-Wformat]
mtd.c:602:1: warning: label ‘done’ defined but not used [-Wunused-label]

Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43383 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/system/mtd/src/mtd.c

index 6dd6eea..ae0d032 100644 (file)
@@ -505,7 +505,7 @@ resume:
 
                                if (mtd_block_is_bad(fd, e)) {
                                        if (!quiet)
-                                               fprintf(stderr, "\nSkipping bad block at 0x%08x   ", e);
+                                               fprintf(stderr, "\nSkipping bad block at 0x%08zx   ", e);
 
                                        skip_bad_blocks += erasesize;
                                        e += erasesize;
@@ -563,7 +563,6 @@ resume:
        if (!quiet)
                fprintf(stderr, "\b\b\b\b    ");
 
-done:
        if (quiet < 2)
                fprintf(stderr, "\n");