svn commit: r211221 - head/usr.sbin/acpi/acpidump

Dag-Erling Smørgrav des at
Fri Aug 13 10:50:42 UTC 2010

Bruce Evans <brde at> 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

More information about the svn-src-all mailing list