Skip to contentSkip to conversation

CM4008: 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 CM4008: fix signedness of env bootargs string pointer

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

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

---
 board/cm4008/cm4008.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
board/cm4008/cm4008.c +2 -2
index d34737c..63296f0 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 CM4008: 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:

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

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

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 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
Randal said it would be tough to do in sed. He didn't say  he  didn't
understand  sed.  Randal  understands sed quite well. Which is why he
uses Perl. :-)         - Larry Wall in <[email protected]>