From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro
Date: Fri, 24 Jan 2014 18:53:38 +0100 [thread overview]
Message-ID: <52E2A8A2.1000505@redhat.com> (raw)
In-Reply-To: <CAFEAcA8frdJjX4Ns7_d2zV8WGuv+D6HRZZhMSmQSjep0dRPL0w@mail.gmail.com>
Il 24/01/2014 18:52, Peter Maydell ha scritto:
> On 24 January 2014 17:47, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx
>> Coverity noticed that it is used inside an "if" statement.
>> Fix it because it's the file with the highest number of defects
>> in the whole QEMU tree!
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> hw/display/blizzard_template.h | 10 +++++-----
>> hw/display/pl110_template.h | 6 +++---
>> hw/display/pxa2xx_template.h | 8 ++++----
>> hw/display/tc6393xb_template.h | 8 ++++----
>> 4 files changed, 22 insertions(+), 23 deletions(-)
>>
>> diff --git a/hw/display/blizzard_template.h b/hw/display/blizzard_template.h
>> index a8a8899..b899a29 100644
>> --- a/hw/display/blizzard_template.h
>> +++ b/hw/display/blizzard_template.h
>> @@ -21,21 +21,21 @@
>> #define SKIP_PIXEL(to) to += deststep
>> #if DEPTH == 8
>> # define PIXEL_TYPE uint8_t
>> -# define COPY_PIXEL(to, from) *to = from; SKIP_PIXEL(to)
>> +# define COPY_PIXEL(to, from) *to = from, SKIP_PIXEL(to)
>
> Why not use the standard do { ... } while(0) idiom ?
I figured that this would make the patch easier to review, but I can use
"do {...} while(0)" too (either directly or as a follow up).
Paolo
next prev parent reply other threads:[~2014-01-24 17:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 17:47 [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro Paolo Bonzini
2014-01-24 17:52 ` Peter Maydell
2014-01-24 17:53 ` Paolo Bonzini [this message]
2014-01-24 18:26 ` Peter Maydell
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=52E2A8A2.1000505@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.