qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/18] qtest: Fix FMT_timeval vs time_t


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 01/18] qtest: Fix FMT_timeval vs time_t
Date: Thu, 22 Aug 2013 11:05:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 08/22/2013 11:01 AM, Andreas Färber wrote:
> Am 22.08.2013 19:53, schrieb Richard Henderson:
>> On 08/22/2013 10:09 AM, Andreas Färber wrote:
>>> FMT_timeval is a file-local #define, so why not change that instead of
>>> all its users?
>>
>> To what?  Unlike size_t, there's no time_t printf format.
>>
>> Recall that checking size(time_t) doesn't suppress the warning
>> when sizeof(int) == sizeof(long)...
>>
>> Since it *is* a local define, it seems easier to match up the
>> users than to do anything else.
> 
> #if defined(__we_are_x86__) && UINTPTR_MAX == UINT32_MAX
> #define FMT_timeval "..."
> #else
> #define FMT_timeval "..."
> #endif
> 
> is the easiest I can think of right now, replace __we_are_x86__ with
> whatever appropriate. That's one central hunk compared to four usage
> sites and who knows more in the future that people may forget about.

As opposed to the cast we already have for the tv_usec part?
How is that any different?  Are we really going to forget?


r~




reply via email to

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