Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2010 12:50:41 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@FreeBSD.org, Takanori Watanabe <takawata@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: svn commit: r211221 - head/usr.sbin/acpi/acpidump
Message-ID:  <86iq3ess5a.fsf@ds4.des.no>
In-Reply-To: <20100813200216.U12816@delplex.bde.org> (Bruce Evans's message of "Fri, 13 Aug 2010 20:25:28 %2B1000 (EST)")
References:  <201008121358.o7CDwk0d098768@svn.freebsd.org> <86pqxn50vr.fsf@ds4.des.no> <4C6414A7.6020306@FreeBSD.org> <868w4bda7e.fsf@ds4.des.no> <4C643352.5010508@FreeBSD.org> <20100813200216.U12816@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <brde@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 =3D=3D 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

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86iq3ess5a.fsf>