[U-Boot] [PATCH] usb: mass storage: Initialize ret variable to zero
Lukasz Majewski
l.majewski at samsung.com
Fri Apr 22 11:23:01 CEST 2016
Up till now this variable wasn't initialized. However, now GCC (4.9.2)
is complaining about it.
To suppress this waning this automatic variable has been set to 0.
Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
---
cmd/usb_mass_storage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index ac53a73..101a87e 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -56,7 +56,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
struct blk_desc *block_dev;
disk_partition_t info;
int partnum;
- int ret;
+ int ret = 0;
struct ums *ums_new;
s = strdup(devnums_part_str);
--
2.0.0.rc2
More information about the U-Boot
mailing list