mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
iteflash: Initialize variable that later used in the function
Latest GCC gives compiler error:
util/iteflash.c: In function verify_flash:
util/iteflash.c:927:9: error: res may be used uninitialized in
this function [-Werror=maybe-uninitialized]
return res;
^
BUG=None
TEST=`make buildall -j` outside chroot
BRANCH=None
Change-Id: I184d8673020552797fd54bb98ee582a63debbf16
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/330873
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
dca765004f
commit
da191ee1ac
@@ -885,7 +885,7 @@ int write_flash(struct ftdi_context *ftdi, const char *filename,
|
||||
int verify_flash(struct ftdi_context *ftdi, const char *filename,
|
||||
uint32_t offset)
|
||||
{
|
||||
int res;
|
||||
int res = 0;
|
||||
int file_size;
|
||||
FILE *hnd;
|
||||
uint8_t *buffer = malloc(flash_size);
|
||||
|
||||
Reference in New Issue
Block a user