[PATCH 3/4] DTC: Appease the printf() format $Gods with a correct type.

David Gibson david at gibson.dropbear.id.au
Sat Oct 20 17:19:20 EST 2007


On Fri, Oct 19, 2007 at 12:43:13PM -0500, Jon Loeliger wrote:
> 
> Signed-off-by: Jon Loeliger <jdl at freescale.com>

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.


> ---
>  tests/get_name.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/get_name.c b/tests/get_name.c
> index 2481741..a76bdf8 100644
> --- a/tests/get_name.c
> +++ b/tests/get_name.c
> @@ -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



More information about the Linuxppc-dev mailing list