Skip to contentSkip to conversation

spl, spl_nor: fix compiler warning

PATCH New Heiko Schocher 2 participants 2 messages Feb 6, 2015 – Feb 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spl, spl_nor: fix compiler warning

executing "tools/buildman/buildman mpc5xx" drops this warning:

common/spl/spl_nor.c: In function 'spl_nor_load_image':
common/spl/spl_nor.c:26:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

fix this.

---

Changes in v2:
- add comment from Masahiro Yamada:
- add const to "struct image_header *header;"
- change subject prefix from "powerpc, mpc5xx" to "spl, spl_nor"

 common/spl/spl_nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_nor.c +1 -1
index 2c0e8e0..c2fee01 100644
@@ -17,7 +17,7 @@ void spl_nor_load_image(void)
 
 #ifdef CONFIG_SPL_OS_BOOT
 	if (!spl_start_uboot()) {
-		struct image_header *header;
+		const struct image_header *header;
 
 		/*
 		 * Load Linux from its location in NOR flash to its defined
Signature · 1 line
2.1.0
#1 lore raw

PATCH v2 1/1 spl, spl_nor: fix compiler warning

Quoted 8 lines · Heiko Schocher

executing "tools/buildman/buildman mpc5xx" drops this warning:

common/spl/spl_nor.c: In function 'spl_nor_load_image':
common/spl/spl_nor.c:26:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

fix this.

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/20150217/894c9155/attachment.sig>