[quagga-dev 4393] Re: bgpd printf size_t warning

Andrew J. Schorr aschorr at telemetry-investments.com
Sat Sep 23 17:49:14 BST 2006

On Sat, Sep 23, 2006 at 05:43:12PM +0100, Paul Jakma wrote:
> My concern is that it will becom really difficult to find all the 
> printf()'s if/when %z becomes useable. Right now, it's obvious where 
> they are ;).
> I.e. my concerns centre on the warnings actually having a (future) 
> use. :)
> >So I see the opposite: the warning message persists on ILP32, but the
> >warning message goes away on LP64...
> Ah, of course yes. And %u makes it the other way around.

So, in sum, you would like to use "%lu" and no cast to print size_t
values?  I guess that should give correct results, as long as
sizeof(size_t) == sizeof(unsigned long) on all our supported platforms
(although that's certainly not a generally safe assumption, and
definitely not as safe as the sizeof(size_t) <= sizeof(unsigned long)
assumption that I was making).


More information about the Quagga-dev mailing list