mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
cmd_ubi: Fix uninitialized variable warning
gcc 3.4.6 previously reported the following error on many MIPS boards which utilize UBI: cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this function The current code is structured such that 'vol' will never be used when it is NULL anyway, but gcc isn't smart enough to figure this out. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
a233631095
commit
3b653fdb32
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ static int ubi_remove_vol(char *volume)
|
|||
{
|
||||
int i, err, reserved_pebs;
|
||||
int found = 0, vol_id = 0;
|
||||
struct ubi_volume *vol;
|
||||
struct ubi_volume *vol = NULL;
|
||||
|
||||
for (i = 0; i < ubi->vtbl_slots; i++) {
|
||||
vol = ubi->volumes[i];
|
||||
|
|
Loading…
Add table
Reference in a new issue