diff mbox

[U-Boot] ARM: fix build error

Message ID 1312171520-24430-1-git-send-email-leiwen@marvell.com
State Superseded
Headers show

Commit Message

Lei Wen Aug. 1, 2011, 4:05 a.m. UTC
error message:
/home/leiwen/reps/clones/uboot/include/asm/u-boot-arm.h:66: error:
conflicting types for 'setenv'
/home/leiwen/reps/clones/uboot/include/common.h:271: note: previous
declaration of 'setenv' was here

Since common code has change the setenv declaration method, follow
the common code to do the same change.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
 arch/arm/include/asm/u-boot-arm.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Wolfgang Denk Aug. 1, 2011, 5:43 a.m. UTC | #1
Dear Lei Wen,

In message <1312171520-24430-1-git-send-email-leiwen@marvell.com> you wrote:
> error message:
> /home/leiwen/reps/clones/uboot/include/asm/u-boot-arm.h:66: error:
> conflicting types for 'setenv'
> /home/leiwen/reps/clones/uboot/include/common.h:271: note: previous
> declaration of 'setenv' was here
> 
> Since common code has change the setenv declaration method, follow
> the common code to do the same change.
> 
> Signed-off-by: Lei Wen <leiwen@marvell.com>
> ---
>  arch/arm/include/asm/u-boot-arm.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
> index 3904027..b01a0e9 100644
> --- a/arch/arm/include/asm/u-boot-arm.h
> +++ b/arch/arm/include/asm/u-boot-arm.h
> @@ -63,7 +63,7 @@ void	setup_revision_tag (struct tag **params);
>  /* To be fixed!							*/
>  /* ------------------------------------------------------------ */
>  /* common/cmd_nvedit.c */
> -int	setenv		(char *, char *);
> +int	setenv		(const char *, const char *);

No, this is the wrong approach.  Instead of maintaining several
duplicated versions of the prototype (and even with a bogus comment
above it) whe should use a single definition only. See previously
posted patches.

Thanks anyway.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
index 3904027..b01a0e9 100644
--- a/arch/arm/include/asm/u-boot-arm.h
+++ b/arch/arm/include/asm/u-boot-arm.h
@@ -63,7 +63,7 @@  void	setup_revision_tag (struct tag **params);
 /* To be fixed!							*/
 /* ------------------------------------------------------------ */
 /* common/cmd_nvedit.c */
-int	setenv		(char *, char *);
+int	setenv		(const char *, const char *);
 
 /* cpu/.../interrupt.c */
 int	arch_interrupt_init	(void);