svn commit: r211221 - head/usr.sbin/acpi/acpidump
des at des.no
Fri Aug 13 10:50:42 UTC 2010
Bruce Evans <brde at optusnet.com.au> writes:
> - `platform_class' has type uint16_t. u_int is larger than that on all
> supported machines, and also on unsupported ones with 16-31 bit u_ints.
> Thus the cast has almost no effect, and has no effect on the result.
you have to cast it to *something*, unless you're willing to assume
blindly that uint16_t == unsigned short (and use %h).
> Anyway, almost all typedefed types should be cast to [u]intmax_t for
> printing, so that you don't have to know too much about what they are.
long or even int is fine in many cases, e.g. uid_t, mode_t
Dag-Erling Smørgrav - des at des.no
More information about the svn-src-head