From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCZGm-0005sN-GH for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:06:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCZGe-0006zQ-1t for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:06:04 -0400 Received: from mail-yh0-x231.google.com ([2607:f8b0:4002:c01::231]:38704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCZGd-0006zJ-Ti for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:05:55 -0400 Received: by mail-yh0-f49.google.com with SMTP id v1so192905yhn.36 for ; Thu, 22 Aug 2013 11:05:55 -0700 (PDT) Sender: Richard Henderson Message-ID: <521652FE.9010909@twiddle.net> Date: Thu, 22 Aug 2013 11:05:50 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1377190729-14008-1-git-send-email-rth@twiddle.net> <1377190729-14008-2-git-send-email-rth@twiddle.net> <521645BA.5020804@suse.de> <52165035.3080901@twiddle.net> <52165201.7050503@suse.de> In-Reply-To: <52165201.7050503@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 01/18] qtest: Fix FMT_timeval vs time_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Anthony Liguori , qemu-devel@nongnu.org, aurelien@aurel32.net 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~