Skip to contentSkip to conversation

Fix compiler warnings

PATCH New Kumar Gala 2 participants 2 messages Jul 7, 2008 – Jul 9, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 Fix compiler warnings

gcc-4.3.x generates the following:

bootm.c: In function 'do_bootm_linux':
bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different size

---
 lib_ppc/bootm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
lib_ppc/bootm.c +2 -2
index 3c1c18b..1d8be4a 100644
@@ -205,14 +205,14 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
 		for (j = 0; j < total; j++) {
 			fdt_get_mem_rsv(of_flat_tree, j, &addr, &size);
-			if (addr == (uint64_t)of_flat_tree) {
+			if (addr == (uint64_t)(u32)of_flat_tree) {
 				fdt_del_mem_rsv(of_flat_tree, j);
 				break;
 			}
 		}
 
 		/* Delete the old LMB reservation */
-		lmb_free(lmb, (uint64_t)of_flat_tree, fdt_totalsize(of_flat_tree));
+		lmb_free(lmb, (uint64_t)(u32)of_flat_tree, fdt_totalsize(of_flat_tree));
 
 		/* Calculate the actual size of the fdt */
 		actualsize = fdt_off_dt_strings(of_flat_tree) +
Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 1/1 Fix compiler warnings

Quoted 10 lines · In message <[email protected]> you wrote:

gcc-4.3.x generates the following:

bootm.c: In function 'do_bootm_linux':
bootm.c:208: warning: cast from pointer to integer of different size bootm.c:215: warning: cast from pointer to integer of different size

---
 lib_ppc/bootm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Repeat after me:
Usenet is not a word processor; it's a medium where aesthetics count.
Mozilla is not a newsreader; it's a web browser.
Windows is not an operating system; it's a GUI on a program loader.
         -- Tom Christiansen in <[email protected]>