[U-Boot] [PATCH] LZMA and LZO causes compile error

Matthias Weisser weisserm at arcor.de
Thu Aug 5 13:17:30 CEST 2010


If both LZMA and LZO compressions are used there is a compile error
in cmd_bootm.c

Signed-off-by: Matthias Weisser <weisserm at arcor.de>
---
 common/cmd_bootm.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index adfa6cd..4562957 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -333,6 +333,9 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 	ulong image_start = os.image_start;
 	ulong image_len = os.image_len;
 	uint unc_len = CONFIG_SYS_BOOTM_LEN;
+#if defined(CONFIG_LZMA) || defined(CONFIG_LZO)
+	int ret;
+#endif /* defined(CONFIG_LZMA) || defined(CONFIG_LZO) */
 
 	const char *type_name = genimg_get_type_name (os.type);
 
@@ -389,7 +392,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 	case IH_COMP_LZMA:
 		printf ("   Uncompressing %s ... ", type_name);
 
-		int ret = lzmaBuffToBuffDecompress(
+		ret = lzmaBuffToBuffDecompress(
 			(unsigned char *)load, &unc_len,
 			(unsigned char *)image_start, image_len);
 		if (ret != SZ_OK) {
@@ -405,7 +408,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 	case IH_COMP_LZO:
 		printf ("   Uncompressing %s ... ", type_name);
 
-		int ret = lzop_decompress((const unsigned char *)image_start,
+		ret = lzop_decompress((const unsigned char *)image_start,
 					  image_len, (unsigned char *)load,
 					  &unc_len);
 		if (ret != LZO_E_OK) {
-- 
1.7.0.4



More information about the U-Boot mailing list