From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkw1w-00079B-QD for qemu-devel@nongnu.org; Wed, 11 Jan 2012 06:07:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rkw1v-0004BV-GL for qemu-devel@nongnu.org; Wed, 11 Jan 2012 06:07:44 -0500 Received: from indium.canonical.com ([91.189.90.7]:33674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkw1v-0004BR-CF for qemu-devel@nongnu.org; Wed, 11 Jan 2012 06:07:43 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Rkw1u-0004vl-3B for ; Wed, 11 Jan 2012 11:07:42 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E923C2E8394 for ; Wed, 11 Jan 2012 11:01:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Jan 2012 10:55:04 -0000 From: Gerd Hoffmann <902720@bugs.launchpad.net> Sender: bounces@canonical.com References: <20111211064733.26491.7785.malonedeb@soybean.canonical.com> <4F0CCCE5.50002@comstyle.com> Message-Id: <4F0D6A88.4090304@redhat.com> Errors-To: bounces@canonical.com Subject: Re: [Qemu-devel] [Bug 902720] [NEW] TIME_MAX not set correctly for OpenBSD in qemu-common.h Reply-To: Bug 902720 <902720@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, >>> Looking at the OpenBSD buildbot logs I noticed a warning that appears >>> to be a bug in the code. >>> OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and >>> 64-bit). Ouch. Adding 64bit arch with 32bit time_t is pretty lame IMHO. There are a bunch of years left to fix that that though. >>> #ifndef TIME_MAX >>> #define TIME_MAX LONG_MAX >>> #endif >>> >>> for OpenBSD this should be INT_MAX. Guess we'll need an #ifdef then. >> This needs special handling for w32 / w64, too. >> Looking at the code where TIME_MAX is used, I assume that >> more fixes are needed. The following code for example >> won't work: >> >> if (lifetime > INT_MAX) { With 32bit time_t lifetime wouldn't become larger than INT_MAX anyway, so it doesn't matter ;) > Still looking for comment on this since you added the initial code which > has this bug in it. cheers, Gerd -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/902720 Title: TIME_MAX not set correctly for OpenBSD in qemu-common.h Status in QEMU: New Bug description: Looking at the OpenBSD buildbot logs I noticed a warning that appears to = be a bug in the code. OpenBSD has a 32-bit time_t on all archs at the moment (32-bit and 64-bit= ). CC i386-softmmu/monitor.o /buildbot-qemu/default_openbsd_current/build/monitor.c: In function 'expi= re_password': /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: over= flow in implicit constant conversion qemu-common.h has... #ifndef TIME_MAX #define TIME_MAX LONG_MAX #endif for OpenBSD this should be INT_MAX. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/902720/+subscriptions