[U-Boot] include: fix mips64 build warning

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Mon Oct 1 13:06:10 CEST 2012


Hi Zhi-zhou,

2012/9/29 Zhi-zhou Zhang <etou.zh at gmail.com>:
> fix warnings when building mips64, we define CONFIG_MIPS64 in config file. And this macro decides size_t.
> hashtable.c: In function 'hexport_r':
> hashtable.c:495:2: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat]
> hashtable.c:554:5: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat]
> hashtable.c:554:5: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat]
> hashtable.c: In function 'himport_r':
> hashtable.c:654:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat]
>
> Signed-off-by: Zhi-zhou Zhang <etou.zh at gmail.com>

thanks but I already fixed this in next branch of
git://git.denx.de/u-boot-mips.git.
I've replaced your check with "#if _MIPS_SZLONG != 64" (gcc built-in).
Linux MIPS does the same.

> ---
>  include/linux/types.h |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 1b0b4a4..33ee095 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -4,6 +4,7 @@
>  #ifdef __KERNEL__
>  #include <linux/config.h>
>  #endif
> +#include <config.h>
>
>  #include <linux/posix_types.h>
>  #include <asm/types.h>
> --
> 1.7.9.5
>

-- 
Best regards,
Daniel


More information about the U-Boot mailing list