From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhxLI-0004Hp-BA for qemu-devel@nongnu.org; Wed, 07 May 2014 04:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhxL9-0007zP-Kv for qemu-devel@nongnu.org; Wed, 07 May 2014 04:36:44 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:23426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhxL9-0007y7-Ek for qemu-devel@nongnu.org; Wed, 07 May 2014 04:36:35 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N57003AH3WH5I90@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 07 May 2014 09:36:17 +0100 (BST) Message-id: <5369F089.3010108@samsung.com> Date: Wed, 07 May 2014 12:36:25 +0400 From: Stanislav Vorobiov MIME-version: 1.0 References: <1397838243-17921-1-git-send-email-s.vorobiov@samsung.com> <20140507080235.GB27925@stefanha-thinkpad.muc.redhat.com> In-reply-to: <20140507080235.GB27925@stefanha-thinkpad.muc.redhat.com> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: sw@weilnetz.de, sangho1206.park@samsung.com, qemu-devel@nongnu.org, alex@alex.org.uk, syeon.hwang@samsung.com, pbonzini@redhat.com Hi, Hm, but (int)res expression is not unsigned, it's signed. I've also had this warning, but with this expression: (res < WAIT_OBJECT_0), that's why I put (int) there. Could it be that for some reason your compiler treats "int" and "unsigned int", that would be really strange though... On 05/07/2014 12:02 PM, Stefan Hajnoczi wrote: > On Fri, Apr 18, 2014 at 08:24:03PM +0400, Stanislav Vorobiov wrote: > > Please fix the following compiler warning with gcc 4.8.2: > >> + } else if ((res == WAIT_TIMEOUT) || (res == WAIT_IO_COMPLETION) || >> + ((int)res < WAIT_OBJECT_0) || >> + (res >= (WAIT_OBJECT_0 + nhandles))) { >> + break; >> + } > > util/oslib-win32.c: In function 'g_poll_fixed': > util/oslib-win32.c:324:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] > ((int)res < WAIT_OBJECT_0) || > ^ >