Skip to contentSkip to conversation

cmd_ximg.c: fix error: 'i' undeclared

PATCH New Wolfgang Denk 1 participant 2 messages Feb 1, 2010 – Feb 3, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 cmd_ximg.c: fix error: 'i' undeclared

Fix compile error:

cmd_ximg.c: In function 'do_imgextract':
cmd_ximg.c:234: error: 'i' undeclared (first use in this function) cmd_ximg.c:234: error: (Each undeclared identifier is reported only once cmd_ximg.c:234: error: for each function it appears in.)

---
 common/cmd_ximg.c |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)
common/cmd_ximg.c +19 -14
index 3e5fb44..b34c4d0 100644
@@ -225,20 +225,25 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 			break;
 #if defined(CONFIG_BZIP2)
 		case IH_COMP_BZIP2:
-			printf ("   Uncompressing part %d ... ", part);
-			/*
-			 * If we've got less than 4 MB of malloc() space,
-			 * use slower decompression algorithm which requires
-			 * at most 2300 KB of memory.
-			 */
-			i = BZ2_bzBuffToBuffDecompress
-				((char*)ntohl(hdr->ih_load),
-				 &unc_len, (char *)data, len,
-				 CONFIG_SYS_MALLOC_LEN < (4096 * 1024), 0);
-			if (i != BZ_OK) {
-				printf ("BUNZIP2 ERROR %d - "
-					"image not loaded\n", i);
-				return 1;
+			{
+				int i;
+
+				printf ("   Uncompressing part %d ... ", part);
+				/*
+                                 * If we've got less than 4 MB of malloc()
+				 * space, use slower decompression algorithm
+				 * which requires@most 2300 KB of memory.
+				 */
+				i = BZ2_bzBuffToBuffDecompress(
+					(char*)ntohl(hdr->ih_load),
+					&unc_len, (char *)data, len,
+					CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
+					0);
+				if (i != BZ_OK) {
+					printf ("BUNZIP2 ERROR %d - "
+						"image not loaded\n", i);
+					return 1;
+				}
 			}
 			break;
 #endif /* CONFIG_BZIP2 */
Signature · 1 line
1.6.2.5
author Applied
#1 lore raw

PATCH 1/3 cmd_ximg.c: fix error: 'i' undeclared

Quoted 11 lines · In message <[email protected]> you wrote:

Fix compile error:

cmd_ximg.c: In function 'do_imgextract':
cmd_ximg.c:234: error: 'i' undeclared (first use in this function) cmd_ximg.c:234: error: (Each undeclared identifier is reported only once cmd_ximg.c:234: error: for each function it appears in.)

---
 common/cmd_ximg.c |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Bei genauerem Hinsehen ist die  Arbeit  weniger  langweilig  als  das
Vergn?gen.                                      -- Charles Baudelaire