From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RklSg-0002Ym-4w for qemu-devel@nongnu.org; Tue, 10 Jan 2012 18:50:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RklSe-0003iw-OB for qemu-devel@nongnu.org; Tue, 10 Jan 2012 18:50:38 -0500 Received: from indium.canonical.com ([91.189.90.7]:59197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RklSe-0003iZ-Jz for qemu-devel@nongnu.org; Tue, 10 Jan 2012 18:50:36 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RklSd-0005a2-9d for ; Tue, 10 Jan 2012 23:50:35 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 47FBA2E804D for ; Tue, 10 Jan 2012 23:50:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 10 Jan 2012 23:42:29 -0000 From: Brad Smith <902720@bugs.launchpad.net> Sender: bounces@canonical.com References: <20111211064733.26491.7785.malonedeb@soybean.canonical.com> Message-Id: <4F0CCCE5.50002@comstyle.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 On 11/12/11 5:53 AM, Stefan Weil wrote: > Am 11.12.2011 07:47, schrieb Brad Smith: >> Public bug reported: >> >> 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 >> 'expire_password': >> /buildbot-qemu/default_openbsd_current/build/monitor.c:944: warning: >> overflow in implicit constant conversion >> >> qemu-common.h has... >> >> #ifndef TIME_MAX >> #define TIME_MAX LONG_MAX >> #endif >> >> for OpenBSD this should be INT_MAX. >> >> ** Affects: qemu >> Importance: Undecided >> Status: New > > 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) { > > What about using > > #define TIME_FOREVER -1 > > instead of TIME_MAX? Of course this would need additional > code changes. > > Regards, > Stefan Weil Gerd? Still looking for comment on this since you added the initial code which has this bug in it. -- = This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- = 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