qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alon Levy <alevy@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ide/atapi: fix set but unused
Date: Thu, 28 Apr 2011 14:16:54 +0200	[thread overview]
Message-ID: <4DB95AB6.7020107@mail.berlios.de> (raw)
In-Reply-To: <4DB95891.5010300@redhat.com>

Am 28.04.2011 14:07, schrieb Paolo Bonzini:
> On 04/28/2011 10:07 AM, Alon Levy wrote:
>> Signed-off-by: Alon Levy<alevy@redhat.com>
>> ---
>>   hw/ide/atapi.c |    4 +++-
>>   1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
>> index 690a0ab..81fa01b 100644
>> --- a/hw/ide/atapi.c
>> +++ b/hw/ide/atapi.c
>> @@ -1080,12 +1080,14 @@ static const struct {
>>
>>   void ide_atapi_cmd(IDEState *s)
>>   {
>> +#ifdef DEBUG_IDE_ATAPI
>>       const uint8_t *packet;
>> +#endif
>>       uint8_t *buf;
>>
>> -    packet = s->io_buffer;
>>       buf = s->io_buffer;
>>   #ifdef DEBUG_IDE_ATAPI
>> +    packet = s->io_buffer;
>>       {
>>           int i;
>>           printf("ATAPI limit=0x%x packet:", s->lcyl | (s->hcyl<<  8));
>
> ACK
>
> ... but why don't we allow interspersing declarations and statements? 
> There are already so many C99 and GCC extensions in use in QEMU.
>
> Paolo

What about using buf instead of packet (no need for extensions, reduces 
code by 4 lines)?

Stefan W.

  reply	other threads:[~2011-04-28 12:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28  8:07 [Qemu-devel] [PATCH] ide/atapi: fix set but unused Alon Levy
2011-04-28 12:07 ` Paolo Bonzini
2011-04-28 12:16   ` Stefan Weil [this message]
2011-04-28 12:35     ` Paolo Bonzini
2011-04-28 13:34       ` [Qemu-devel] [PATCHv2] " Alon Levy
2011-04-28 14:46         ` Stefan Weil
2011-04-29 10:58         ` Kevin Wolf

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=4DB95AB6.7020107@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=alevy@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).