bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sharutils-4.11.1] Compilation warnings


From: Eric Blake
Subject: Re: [sharutils-4.11.1] Compilation warnings
Date: Fri, 07 Dec 2012 09:11:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/07/2012 02:10 AM, Petr Pisar wrote:
> On Thu, Dec 06, 2012 at 06:09:41PM -0800, Bruce Korb wrote:
>> On 12/06/12 16:29, Eric Blake wrote:
>> WRT:  using "%lu" for uint64_t formatting:
>>
>>> ... The only portable solution here is to cast to '[u]intmax_t'.
>>
>> What is the correct formatting element?
> 
> "%ju". See printf(3).

Alas, not all OSs implement %ju yet; for that to work, you'd need to use
the gnulib modules for *printf replacements.  Simpler may be to use the
gnulib <inttypes.h> replacement, and use PRIuMAX.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]