Fix 'maybe-uninitialized' warnings
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 10 Apr 2017 18:48:48 +0000 (20:48 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Tue, 11 Apr 2017 14:11:46 +0000 (16:11 +0200)
u-boot/common/cmd_flash.c

index fea96d7ffeda0b4c499f5a96e416e84c9437cf7b..145729d999b61f544be9e85f6c05d01f40a3dcd4 100644 (file)
@@ -272,8 +272,9 @@ static int flash_fill_sect_ranges(ulong addr_first, ulong addr_last, int *s_firs
 int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){
        flash_info_t *info;
        ulong bank, addr_first, addr_last;
-       int n, sect_first, sect_last;
+       int n;
        int rcode = 0;
+       int sect_first = 0, sect_last = 0;
 
        if(argc < 2){
                print_cmd_help(cmdtp);