Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sys/netinet6/in6_ifattach.c expects int but is size_t



On Thu, Aug 13, 2009 at 11:21:42PM -0500, reed%reedmedia.net@localhost wrote:
> Building HEAD failed on my amd64 system (using build.sh).
> 
> cc1: warnings being treated as errors
> /usr/src/sys/netinet6/in6_ifattach.c: In function 'getifp':
> /usr/src/sys/netinet6/in6_ifattach.c:903: warning: format '%d' expects 
> type 'int', but argument 4 has type 'size_t'
> 
> Here is my patch:
> 
> -             printf("%s: ifindex %d >= limit %d\n", __func__, ifindex,
> +             printf("%s: ifindex %d >= limit %lu\n", __func__, ifindex,

Needs to be %zu (or %zd if you want an implicit (effective) cast to
signed!).

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index