From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Hollis Blanchard <hollis@penguinppc.org>
Subject: Re: [Qemu-devel] fix unsigned comparison warning in TCG
Date: Thu, 07 Oct 2010 16:15:16 -0700 [thread overview]
Message-ID: <4CAE5484.6060308@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTi=AFOyVNAtvQ_1s6LW=S9WiW4Z6vkGOZWExctE6@mail.gmail.com>
On 9/26/2010 11:33 AM, Blue Swirl wrote:
> On Sun, Sep 26, 2010 at 5:40 PM, Hollis Blanchard <hollis@penguinppc.org> wrote:
>> TCGOpcode is an enum, which apparently can be unsigned.
>>
>> Signed-off-by: Hollis Blanchard <hollis@penguinppc.org>
>> ---
>>
>> % ./configure --target-list=ppcemb-softmmu --enable-debug
>> % make
>> ...
>> CC ppcemb-softmmu/tcg/tcg.o
>> cc1: warnings being treated as errors
>> /home/hollisb/source/qemu.git/tcg/tcg.c: In function
>> ‘tcg_add_target_add_op_defs’:
>> /home/hollisb/source/qemu.git/tcg/tcg.c:1030: error: comparison of
>> unsigned expression >= 0 is always true
>> % gcc -v
>> gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
>>
>> diff --git a/tcg/tcg.c b/tcg/tcg.c
>> index e0a9030..7e96859 100644
>> --- a/tcg/tcg.c
>> +++ b/tcg/tcg.c
>> @@ -1027,7 +1027,7 @@ void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdef
>> if (tdefs->op == (TCGOpcode)-1)
>> break;
>> op = tdefs->op;
>> - assert(op >= 0 && op < NB_OPS);
>> + assert(op < NB_OPS);
>
> Please add int cast, like 95ee3914bfd551aeec49932a400530141865acad.
>
What is the latest on this? Waiting for this fix as I use --enable-debug a lot. :)
- JV
next prev parent reply other threads:[~2010-10-07 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 17:40 [Qemu-devel] fix unsigned comparison warning in TCG Hollis Blanchard
2010-09-26 18:33 ` Blue Swirl
2010-10-07 23:15 ` Venkateswararao Jujjuri (JV) [this message]
2010-10-08 8:32 ` [Qemu-devel] [PATCH] tcg: Fix compiler error (comparison of unsigned expression) Stefan Weil
2010-10-08 16:57 ` [Qemu-devel] " Hollis Blanchard
2010-10-08 21:43 ` Stefan Weil
2010-10-13 18:58 ` Stefan Weil
2010-10-13 19:22 ` Hollis Blanchard
2010-10-13 19:33 ` Blue Swirl
2010-10-20 20:56 ` Blue Swirl
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=4CAE5484.6060308@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=hollis@penguinppc.org \
--cc=qemu-devel@nongnu.org \
/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).