Skip to contentSkip to conversation

spl_nor: fix warning when compiled for 64bit target

PATCH In review Masahiro Yamada 2 participants 3 messages Feb 29, 2016 – Mar 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl_nor: fix warning when compiled for 64bit target

Fix "warning: cast to pointer from integer of different size".

---

 common/spl/spl_nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_nor.c +1 -1
index e08afe2..d0bd0b0 100644
@@ -59,7 +59,7 @@ int spl_nor_load_image(void)
 	spl_parse_image_header(
 			(const struct image_header *)CONFIG_SYS_UBOOT_BASE);
 
-	memcpy((void *)spl_image.load_addr,
+	memcpy((void *)(unsigned long)spl_image.load_addr,
 	       (void *)(CONFIG_SYS_UBOOT_BASE + sizeof(struct image_header)),
 	       spl_image.size);
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 spl_nor: fix warning when compiled for 64bit target

Quoted 3 lines · Masahiro Yamada

Fix "warning: cast to pointer from integer of different size".

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160229/b3d2fecd/attachment.sig>
#2 lore raw
In reply to Masahiro Yamada
Quoted 4 lines · Masahiro Yamada

Fix "warning: cast to pointer from integer of different size".

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/bba058da/attachment.sig>