include: fix mips64 build warning
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]
--- include/linux/types.h | 1 + 1 file changed, 1 insertion(+)
include/linux/types.h +1 -0
@@ -4,6 +4,7 @@#ifdef __KERNEL__#include <linux/config.h> #endif +#include <config.h> #include <linux/posix_types.h> #include <asm/types.h>
Signature · 1 line
1.7.9.5
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]
--- include/linux/types.h | 1 + 1 file changed, 1 insertion(+)
include/linux/types.h +1 -0
@@ -4,6 +4,7 @@#ifdef __KERNEL__#include <linux/config.h> #endif +#include <config.h> #include <linux/posix_types.h> #include <asm/types.h>
Signature · 1 line
1.7.9.5
Hi Zhi-zhou,
2012/9/29 Zhi-zhou Zhang <[email protected]>:
Quoted 9 lines
fix warnings when building mips64, we define
CONFIG_MIPS64in config file. And this macro decidessize_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 <[email protected]>
thanks but I already fixed this in next branch ofgit://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.
Quoted 19 lines
--- include/linux/types.h | 1 + 1 file changed, 1 insertion(+)include/linux/types.h +1
-1@@ -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
Signature · 2 lines
Best regards, Daniel
Quoted 32 lines · Daniel Schwierzeck
Hi Zhi-zhou,
2012/9/29 Zhi-zhou Zhang <[email protected]>:
Quoted 9 lines
fix warnings when building mips64, we define
CONFIG_MIPS64in config file. And this macro decidessize_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 <[email protected]>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.Quoted 14 lines
--- include/linux/types.h | 1 + 1 file changed, 1 insertion(+)include/linux/types.h +1
-0@@ -4,6 +4,7 @@#ifdef __KERNEL__#include <linux/config.h> #endif +#include <config.h>
Quoted 9 lines
Quoted 5 lines
include/linux/types.h +0
-1#include <linux/posix_types.h> #include <asm/types.h> --1.7.9.5
--
Best regards,
Daniel
That's fine, thanks.
Signature · 2 lines
Regards, Zhizhou Zhang