| Submitter | Zhi-zhou Zhang |
|---|---|
| Date | Sept. 29, 2012, 11:02 a.m. |
| Message ID | <1348916527-13634-1-git-send-email-etou.zh@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/188026/ |
| State | Not Applicable |
| Delegated to: | Daniel Schwierzeck |
| Headers | show |
Comments
Hi Zhi-zhou, 2012/9/29 Zhi-zhou Zhang <etou.zh@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@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 >
On Mon, Oct 1, 2012 at 7:06 PM, Daniel Schwierzeck <daniel.schwierzeck@gmail.com> wrote: > Hi Zhi-zhou, > > 2012/9/29 Zhi-zhou Zhang <etou.zh@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@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 That's fine, thanks.
Patch
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>
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@gmail.com> --- include/linux/types.h | 1 + 1 file changed, 1 insertion(+)