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

Reply via email to