@@ -55,7 +55,7 @@ void check_name(void *fdt, const char *path)if(len!=strlen(getname))FAIL("fdt_get_name(%s) returned length %d instead of %d",-path,len,strlen(getname));+path,len,(int)strlen(getname));/* Now check that it doesn't break if we omit len */getname2=fdt_get_name(fdt,offset,NULL);
From: David Gibson <hidden> Date: 2007-10-20 07:19:20
On Fri, Oct 19, 2007 at 12:43:13PM -0500, Jon Loeliger wrote:
Signed-off-by: Jon Loeliger <redacted>
Hrm.... I'm very dubious about this.
What compiler/platform is this? I can't off the top of my head think
of one where size_t shouldn't be promoted to int automatically.
Or there's the %z modifier, which explicitly specifies a size_t, but
I'm not sure if that's C99 or a glibc extension.
@@ -55,7 +55,7 @@ void check_name(void *fdt, const char *path)if(len!=strlen(getname))FAIL("fdt_get_name(%s) returned length %d instead of %d",-path,len,strlen(getname));+path,len,(int)strlen(getname));/* Now check that it doesn't break if we omit len */getname2=fdt_get_name(fdt,offset,NULL);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-10-20 09:06:33
On Sat, Oct 20, 2007 at 10:51:29AM +0200, Andreas Schwab wrote:
David Gibson [off-list ref] writes:
quoted
What compiler/platform is this? I can't off the top of my head think
of one where size_t shouldn't be promoted to int automatically.
Only types narrower than int are subject to integer promotion.
Duh, yes. Sorry.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson