[U-Boot] [PATCH 2/3] Fix a few gcc warnings.

Wolfgang Denk wd at denx.de
Mon Apr 25 00:14:58 CEST 2011


Dear Joakim Tjernlund,

In message <1303633774-22961-3-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> Noticed while building all of mpc8xx

Please include in the commit message what the compiler warnings were,
and which compiler version was used to produce these warnings.


> diff --git a/examples/standalone/timer.c b/examples/standalone/timer.c
> index 834cc9a..a4d4581 100644
> --- a/examples/standalone/timer.c
> +++ b/examples/standalone/timer.c
> @@ -186,7 +186,7 @@ int timer (int argc, char * const argv[])
>  	/* clear all events */
>  	*hwp->terp = (CPMT_EVENT_CAP | CPMT_EVENT_REF);
>  
> -	printf (usage);
> +	printf("%s", usage);

I dislike this change.  Which warning does the old code produce for
you?

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
Children begin by loving their parents. After a time they judge them.
Rarely, if ever, do they forgive them.                  - Oscar Wilde


More information about the U-Boot mailing list