bootm: fix pointer warning with lzma
PATCH 1/1 bootm: fix pointer warning with lzma
Avoid warning:cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:394: warning: passing argument 2 of
'lzmaBuffToBuffDecompress' from incompatible pointer type
For 32 bit systems, this change shouldn't make a difference to code size since sizeof(size_t) and sizeof(unsigned int) are equal. But it does fix the warning.
--- common/cmd_bootm.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
common/cmd_bootm.c +5 -2
@@ -386,12 +386,14 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)break ;#endif /* CONFIG_BZIP2 */ #ifdef CONFIG_LZMA -case IH_COMP_LZMA : +case IH_COMP_LZMA : { +SizeT lzma_len = unc_len;printf (" Uncompressing %s ... " , type_name);int ret =lzmaBuffToBuffDecompress ( - (unsigned char *)load, &unc_len, + (unsigned char *)load, &lzma_len, (unsigned char *)image_start, image_len); + unc_len = lzma_len;if (ret !=SZ_OK ) {printf ("LZMA: uncompress or overwrite error %d " "- must RESET board to recover\n" , ret);
@@ -400,6 +402,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress) } *load_end = load + unc_len;break ; + }#endif /* CONFIG_LZMA */ #ifdef CONFIG_LZO case IH_COMP_LZO :
Signature · 1 line
1.7.2
Wolfgang Denk
AppliedPATCH 1/1 bootm: fix pointer warning with lzma
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Avoid warning:
cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:394: warning: passing argument 2 of
'lzmaBuffToBuffDecompress' from incompatible pointer type
Quoted 8 lines
For 32 bit systems, this change shouldn't make a difference to code size since
sizeof(size_t)and sizeof(unsigned int) are equal. But it does fix the warning.Signed-off-by Mike Frysinger <[email protected]>--- common/cmd_bootm.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 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
Space is big. You just won't believe how vastly, hugely, mind-
bogglingly big it is. I mean, you may think it's a long way down the
road to the drug store, but that's just peanuts to space.
-- The Hitchhiker's Guide to the Galaxy