Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dist/ipf/netinet
> Log Message:
> One can't portably print a size_t with an %u format directive.
> Since this might be in the kernel, cast to unsigned int before printing.
> Fixes build problem for amd64 (and presumably also our other LP64 ports).
>
> since size_t is "unsigned long" on some platforms, casting
> to int seems not really right (though i'd hope it wouldn't
> actually matter.) maybe just use %z format instead?
It's the size of a struct, so "unsigned long" vs "unsigned int"
should not matter.
I don't think %z can be used, because this might be in the
kernel, and I don't think that format specifier is available
there.
Besides, this is third-party software, and %z isn't necessarily
available on all the target platforms for the package, and there
is a point to minimizing the local differences. (Yes, I've
forwarded the patches to the author, at least his @netbsd.org
address.)
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index