Patchwork [U-Boot] CM4008: fix signedness of env bootargs string pointer

login
register
mail settings
Submitter Greg Ungerer
Date Sept. 10, 2011, 8:36 a.m.
Message ID <1315643800-10579-1-git-send-email-greg.ungerer@opengear.com>
Download mbox | patch
Permalink /patch/114150/
State Accepted
Commit 61a1926ac8eaa3ef0713063c4327a38b3712373a
Headers show

Comments

Greg Ungerer - Sept. 10, 2011, 8:36 a.m.
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

Signed-off-by: Greg Ungerer <greg.ungerer@opengear.com>
---
 board/cm4008/cm4008.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Wolfgang Denk - Sept. 10, 2011, 2:10 p.m.
Dear Greg Ungerer,

In message <1315643800-10579-1-git-send-email-greg.ungerer@opengear.com> you wrote:
> 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
> 
> Signed-off-by: Greg Ungerer <greg.ungerer@opengear.com>
> ---
>  board/cm4008/cm4008.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/cm4008/cm4008.c b/board/cm4008/cm4008.c
index d34737c..63296f0 100644
--- a/board/cm4008/cm4008.c
+++ b/board/cm4008/cm4008.c
@@ -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 */