Skip to contentSkip to conversation

CM41xx: fix signedness of env bootargs string pointer

PATCH New Greg Ungerer 2 participants 2 messages Sep 10, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CM41xx: fix signedness of env bootargs string pointer

The pointer to the flash based bootargs should be a "char *", not unsigned. Fixes:

cm41xx.c: In function ?env_flash_cmdline?:
cm41xx.c:67: warning: pointer targets in passing argument 2 of ?setenv? differ in signedness

---
 board/cm41xx/cm41xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
board/cm41xx/cm41xx.c +2 -2
index 02d05af..9a6d89f 100644
@@ -46,8 +46,8 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 int env_flash_cmdline (void)
 {
-	unsigned char *sp = (unsigned char *) 0x0201c020;
-	unsigned char *ep;
+	char *sp = (char *) 0x0201c020;
+	char *ep;
 	int len;
 
 	/* Check if "erase" push button is depressed */
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 CM41xx: fix signedness of env bootargs string pointer

Dear Greg Ungerer,

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

The pointer to the flash based bootargs should be a "char *", not unsigned. Fixes:

cm41xx.c: In function ???env_flash_cmdline???:
cm41xx.c:67: warning: pointer targets in passing argument 2 of ???setenv??? differ in signedness

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

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
God may be subtle, but He isn't plain mean.         - Albert Einstein