[U-Boot] [PATCH] ARM: fix build error

Wolfgang Denk wd at denx.de
Mon Aug 1 07:43:57 CEST 2011


Dear Lei Wen,

In message <1312171520-24430-1-git-send-email-leiwen at 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 at 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

-- 
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
In the future, you're going to get computers as prizes  in  breakfast
cereals.  You'll  throw  them out because your house will be littered
with them.                                             - Robert Lucky


More information about the U-Boot mailing list