[quagga-dev 4373] Re: bgpd printf size_t warning
gdt at ir.bbn.com
Wed Sep 20 14:47:58 BST 2006
"Andrew J. Schorr" <aschorr at telemetry-investments.com> writes:
> On Wed, Sep 20, 2006 at 09:00:44AM -0400, Greg Troxel wrote:
>> I think that's fine. len is smallish, so surely the size_t values of
>> interest fit in an unsigned long.
> That begs the question: are you aware of any platforms where
> a size_t has more bits than an unsigned long (since you seem to
> be suggesting that this patch is not generally OK)?
No, I am not, but to my knowledge that situation isn't precluded by
> I was assuming that does not happen, but perhaps I'm mistaken...
I really doubt a system would have sizeof(size_t) > sizeof(unsigned
long). I was making the argument that the range of values would be
small, and thus there would be no errors arising from the cast.
In this particular case, static analysis shows that the sizes will be
Greg Troxel <gdt at ir.bbn.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 185 bytes
Desc: not available
More information about the Quagga-dev