summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2021-11-25 20:22:20 +0300
committerDongjin Kim <tobetter@gmail.com>2021-12-11 12:24:03 +0300
commite88f29a498d4bd80e55c7713d22ec0e3550502bc (patch)
treee48b2df8321df649c8c73de01a42ad6076ad79f5
parentfde5a2ba742b2adbff5ebbb4c3f0c6b88d7f8e3c (diff)
downloadu-boot-e88f29a498d4bd80e55c7713d22ec0e3550502bc.tar.xz
ODROID-COMMON: cmd/bmp: fix in the function 'gunzip_bmp'
This patch is to resolve two issues: 1) Compile error cmd/bmp.c: In function ‘gunzip_bmp’: cmd/bmp.c:61:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); ^ cmd/bmp.c:61:8: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); ^ 2) Return lenght of decompressed buffer to given arguemnt 'lenp' when decompression is success. Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I485ab72186f7130997fb6d0793c3b805efaa8b17
-rw-r--r--cmd/bmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/bmp.c b/cmd/bmp.c
index fb6fe3f286..c51dbbdf18 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -58,7 +58,7 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
bmp = dst;
/* align to 32-bit-aligned-address + 2 */
- bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2);
+ bmp = (struct bmp_image *)((((unsigned long)dst + 1) & ~3) + 2);
if (gunzip(bmp, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE, map_sysmem(addr, 0),
&len) != 0) {
@@ -81,6 +81,7 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
debug("Gzipped BMP image detected!\n");
*alloc_addr = dst;
+ *lenp = len;
return bmp;
}
#else