[U-Boot] [PATCH 2/3] cmd_sf: Init "skipped" to avoid GCC warning

Marek Vasut marek.vasut at gmail.com
Tue Oct 4 00:56:08 CEST 2011


Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
Cc: Mike Frysinger <vapier at gentoo.org>
---
 common/cmd_sf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index c8c547a..73006c5 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -161,7 +161,7 @@ static int spi_flash_update(struct spi_flash *flash, u32 offset,
 	char *cmp_buf;
 	const char *end = buf + len;
 	size_t todo;		/* number of bytes to do in this pass */
-	size_t skipped;		/* statistics */
+	size_t skipped = 0;	/* statistics */
 
 	cmp_buf = malloc(flash->sector_size);
 	if (cmp_buf) {
-- 
1.7.6.2



More information about the U-Boot mailing list