diff mbox series

splash: Fix build warning on 64 bits CPU

Message ID 1591782743-22846-2-git-send-email-ye.li@nxp.com
State Accepted
Commit 70b06d95426c016ce302b408f6d2ba9bd3bbda02
Headers show
Series splash: Fix build warning on 64 bits CPU | expand

Commit Message

Ye Li June 10, 2020, 9:52 a.m. UTC
Get below warning on ARM64 platform, because the bmp_load_addr
is defined to u32.

common/splash.c: In function ?splash_video_logo_load?:
common/splash.c:74:9: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
   74 |  memcpy((void *)bmp_load_addr, bmp_logo_bitmap,

Signed-off-by: Ye Li <ye.li at nxp.com>
---
 common/splash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jagan Teki June 17, 2020, 7:09 a.m. UTC | #1
On Wed, Jun 10, 2020 at 3:23 PM Ye Li <ye.li at nxp.com> wrote:
>
> Get below warning on ARM64 platform, because the bmp_load_addr
> is defined to u32.
>
> common/splash.c: In function ?splash_video_logo_load?:
> common/splash.c:74:9: warning: cast to pointer from integer
> of different size [-Wint-to-pointer-cast]
>    74 |  memcpy((void *)bmp_load_addr, bmp_logo_bitmap,
>
> Signed-off-by: Ye Li <ye.li at nxp.com>
> ---

Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>
Tested-by: Jagan Teki <jagan at amarulasolutions.com> # bpi-m1+, bpi-m64
Anatolij Gustschin June 29, 2020, 7:05 a.m. UTC | #2
On Wed, 10 Jun 2020 02:52:22 -0700
Ye Li ye.li at nxp.com wrote:

> Get below warning on ARM64 platform, because the bmp_load_addr
> is defined to u32.
> 
> common/splash.c: In function ?splash_video_logo_load?:
> common/splash.c:74:9: warning: cast to pointer from integer
> of different size [-Wint-to-pointer-cast]
>    74 |  memcpy((void *)bmp_load_addr, bmp_logo_bitmap,
> 
> Signed-off-by: Ye Li <ye.li at nxp.com>
> ---
>  common/splash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-video/master, thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/common/splash.c b/common/splash.c
index e7d8477..2b9313e 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -59,7 +59,7 @@  static struct splash_location default_splash_locations[] = {
 static int splash_video_logo_load(void)
 {
 	char *splashimage;
-	u32 bmp_load_addr;
+	ulong bmp_load_addr;
 
 	splashimage = env_get("splashimage");
 	if (!splashimage)