GCC47: Fix warning in cmd_nand.c
authorMarek Vasut <marex@denx.de>
Sat, 28 Apr 2012 22:28:39 +0000 (00:28 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 29 Apr 2012 12:13:53 +0000 (14:13 +0200)
cmd_nand.c: In function ‘arg_off_size’:
cmd_nand.c:216:5: warning: ‘maxsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
common/cmd_nand.c

index bae630dfb68ff1b3847a11d9b2f028751f105640..0fd3a6c414aa9c35f13a8ec1a9bd60d4614634df 100644 (file)
@@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[], int *idx,
                        loff_t *off, loff_t *size)
 {
        int ret;
-       loff_t maxsize;
+       loff_t maxsize = 0;
 
        if (argc == 0) {
                *off = 0;