cmd_nand: Fix possible uninited max_size variable
PATCH 1/1 cmd_nand: Fix possible uninited max_size variable
GCC 4.7 error:cmd_nand.c: In function ?arg_off_size?:
cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this function [-Wmaybe-uninitialized]
--- common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_nand.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.9.1
PATCH 1/1 cmd_nand: Fix possible uninited max_size variable
Quoted 3 lines · Marek Vasut
GCC 4.7 error:
cmd_nand.c: In function ?arg_off_size?:
cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this function [-Wmaybe-uninitialized]
Yay, with a new compiler comes a new batch of false positives. :-P
I'm surprised it complained at line 216 but not line 208.
Quoted 11 lines
Signed-off-by Marek Vasut <[email protected]>Cc Scott Wood <[email protected]>--- common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)common/cmd_nand.c +0
-0
common/cmd_nand.c static int arg_off_size(int argc, char *const argv[], int *idx, · line 197
Quoted 8 lines
common/cmd_nand.c +1
-1@@ -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 ;
I'll apply for next merge window.
-Scott
PATCH 1/1 cmd_nand: Fix possible uninited max_size variable
Dear Scott Wood,
Quoted 7 lines · Marek Vasut
Quoted 4 lines
GCC 4.7 error:
cmd_nand.c: In function ?arg_off_size?:
cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this function [-Wmaybe-uninitialized]Yay, with a new compiler comes a new batch of false positives. :-P
And I'm the early adopter ... crusader of new compiler tests with uboot ;-D
Quoted 32 lines
I'm surprised it complained at line 216 but not line 208.
Quoted 16 lines
Signed-off-by Marek Vasut <[email protected]>Cc Scott Wood <[email protected]>---
common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)common/cmd_nand.c +0
-0@@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[],int *idx, loff_t *off, loff_t *size)common/cmd_nand.c static int arg_off_size(int argc, char *const argv[], · line 197
Quoted 10 lines
common/cmd_nand.c +1
-1{int ret; -loff_t maxsize; +loff_t maxsize =0 ;if (argc ==0 ) { *off =0 ;I'll apply for next merge window.
Quoted 6 lines
-Scott
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Best regards,
Marek Vasut