[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: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 01/18] qtest: Fix FMT_timeval vs time_t |
Date: |
Thu, 22 Aug 2013 20:01:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
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.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[Qemu-devel] [PATCH 02/18] tcg: Change flush_icache_range arguments to uintptr_t, Richard Henderson, 2013/08/22
[Qemu-devel] [PATCH 04/18] tcg: Fix next_tb type in cpu_exec, Richard Henderson, 2013/08/22
[Qemu-devel] [PATCH 03/18] tcg: Change tcg_qemu_tb_exec return to uintptr_t, Richard Henderson, 2013/08/22
[Qemu-devel] [PATCH 05/18] tcg: Define TCG_TYPE_PTR properly, Richard Henderson, 2013/08/22
[Qemu-devel] [PATCH 06/18] tcg: Define TCG_ptr properly, Richard Henderson, 2013/08/22