From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCZCg-00030B-3c for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:01:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCZCY-0005E6-Qk for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:01:50 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54387 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCZCY-0005Dz-LY for qemu-devel@nongnu.org; Thu, 22 Aug 2013 14:01:42 -0400 Message-ID: <52165201.7050503@suse.de> Date: Thu, 22 Aug 2013 20:01:37 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= 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> In-Reply-To: <52165035.3080901@twiddle.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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: Richard Henderson Cc: Anthony Liguori , qemu-devel@nongnu.org, aurelien@aurel32.net Am 22.08.2013 19:53, schrieb Richard Henderson: > On 08/22/2013 10:09 AM, Andreas F=E4rber wrote: >> FMT_timeval is a file-local #define, so why not change that instead of >> all its users? >=20 > To what? Unlike size_t, there's no time_t printf format. >=20 > Recall that checking size(time_t) doesn't suppress the warning > when sizeof(int) =3D=3D sizeof(long)... >=20 > 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 =3D=3D 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg