Date: Thu, 12 Aug 2010 17:03:36 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Takanori Watanabe <takawata@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211221 - head/usr.sbin/acpi/acpidump Message-ID: <86pqxn50vr.fsf@ds4.des.no> In-Reply-To: <201008121358.o7CDwk0d098768@svn.freebsd.org> (Takanori Watanabe's message of "Thu, 12 Aug 2010 13:58:46 %2B0000 (UTC)") References: <201008121358.o7CDwk0d098768@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Takanori Watanabe <takawata@FreeBSD.org> writes: > - printf("\tClass %d Base Address 0x%jx Length %llu\n\n", > + printf("\tClass %d Base Address 0x%jx Length %" PRIu64 "\n\n", > tcpa->platform_class, paddr, len); This is just as wrong as the previous attempt. 1) platform_class is not an int. 2) paddr is not a uintmax_t. 3) so far, we've avoided using the PRI macros. Slightly better: printf("\tClass %u Base Address 0x%jx Length %ju\n\n", (unsigned int)tcpa->platform_class, (uintmax_t)paddr, (uintmax_t)len= ); but it would probably be easier to define paddr and len as unsigned long long instead of the misspelled u_int64_t, and use %llx and %llu. 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?86pqxn50vr.fsf>