common: splash_source: fix -Wint-to-pointer-cast warning
A message that is not in the archive (sent off-list or not yet received): CGME20201207081826epcas1p1043b2d41fa47108a9f2f1182884b6c4e@epcas1p1.samsung.com
PATCH 1/1 common: splash_source: fix -Wint-to-pointer-cast warning
Fix -Wint-to-pointer-cast warning
common/splash_source.c: In function 'splash_load_raw':common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
100 | bmp_hdr = (struct bmp_header *)bmp_load_addr;
| ^common/splash_source.c: In function 'splash_sf_read_raw':common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
39 | return spi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
| ^
--- common/splash_source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/splash_source.c +2 -2
@@ -36,7 +36,7 @@ static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size) return -ENODEV; } -return spi_flash_read (sf, offset, read_size, (void *)bmp_load_addr); +return spi_flash_read (sf, offset, read_size, (void *)(uintptr_t )bmp_load_addr); }#else static int splash_sf_read_raw (u32 bmp_load_addr,int offset,size_t read_size)
@@ -97,7 +97,7 @@ static int splash_load_raw(struct splash_location *location, u32 bmp_load_addr)if (res <0 )return res; - bmp_hdr = (struct bmp_header *)bmp_load_addr; + bmp_hdr = (struct bmp_header *)(uintptr_t )bmp_load_addr; bmp_size =le32_to_cpu (bmp_hdr->file_size);if (bmp_load_addr + bmp_size >= gd->start_addr_sp)
Signature · 1 line
2.29.0
PATCH 1/1 common: splash_source: fix -Wint-to-pointer-cast warning
Quoted 12 lines · Jaehoon Chung
Fix -Wint-to-pointer-cast warning
common/splash_source.c: In function 'splash_load_raw':common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
100 |bmp_hdr= (structbmp_header*)bmp_load_addr;
| ^common/splash_source.c: In function 'splash_sf_read_raw':common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
39 | returnspi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
| ^
Quoted 5 lines
Signed-off-by Jaehoon Chung <[email protected]>--- common/splash_source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH 1/1 common: splash_source: fix -Wint-to-pointer-cast warning
Quoted 13 lines · Simon Glass
Quoted 12 lines · Jaehoon Chung
Fix -Wint-to-pointer-cast warning
common/splash_source.c: In function 'splash_load_raw':common/splash_source.c:100:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
100 |bmp_hdr= (structbmp_header*)bmp_load_addr;
| ^common/splash_source.c: In function 'splash_sf_read_raw':common/splash_source.c:39:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
39 | returnspi_flash_read(sf, offset, read_size, (void *)bmp_load_addr);
| ^
Quoted 7 lines
Quoted 5 lines
Signed-off-by Jaehoon Chung <[email protected]>--- common/splash_source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <[email protected]>
Ping. Is there any progress about this patch?
Best Regards,
Jaehoon Chung
Quoted 1 line
PATCH 1/1 common: splash_source: fix -Wint-to-pointer-cast warning
In reply to Jaehoon ChungOn Mon, 7 Dec 2020 17:18:51 +0900
Jaehoon Chung jh80.chung at samsung.com wrote:
...
Quoted 3 lines
--- common/splash_source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-video/master, thanks!
--
Anatolij