From: Stanislav Vorobiov <s.vorobiov@samsung.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: sw@weilnetz.de, sangho1206.park@samsung.com,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
syeon.hwang@samsung.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows
Date: Wed, 07 May 2014 13:06:20 +0400 [thread overview]
Message-ID: <5369F78C.7040904@samsung.com> (raw)
In-Reply-To: <6C900CB5-FDDF-4D2F-8DF1-1DD356120FB3@alex.org.uk>
Hi,
Yes it's probably the cause, thanks.
On 05/07/2014 12:49 PM, Alex Bligh wrote:
>
> On 7 May 2014, at 09:36, Stanislav Vorobiov wrote:
>
>> 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...
>
> I suspect the problem is that WAIT_OBJECT_0 is defined as an unsigned long:
>
> #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
>
> #define STATUS_WAIT_0 ((DWORD)0x00000000L)
>
> So IIRC under the 'usual conversions', and int compared with it will be cast to an unsigned long too.
>
> I think you want to cast WAIT_OBJECT_0 to a long or similar.
>
> Alex
>
>
>> 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) ||
>>> ^
>>>
>>
>>
>>
>
prev parent reply other threads:[~2014-05-07 9:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1397838243-17921-1-git-send-email-s.vorobiov@samsung.com>
2014-05-06 12:23 ` [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows Stefan Hajnoczi
2014-05-06 12:38 ` Paolo Bonzini
2014-05-06 15:49 ` Alex Bligh
2014-05-06 16:52 ` Stefan Weil
2014-05-07 8:02 ` Stefan Hajnoczi
2014-05-07 8:36 ` Stanislav Vorobiov
2014-05-07 8:49 ` Alex Bligh
2014-05-07 9:06 ` Stanislav Vorobiov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5369F78C.7040904@samsung.com \
--to=s.vorobiov@samsung.com \
--cc=alex@alex.org.uk \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sangho1206.park@samsung.com \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
--cc=syeon.hwang@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).