From: Paolo Bonzini <pbonzini@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 7/9] openpic: avoid a warning from clang analyzer
Date: Mon, 05 Sep 2011 08:48:11 +0200 [thread overview]
Message-ID: <4E6470AB.1080402@redhat.com> (raw)
In-Reply-To: <CAAu8pHtJefidoG2-rFFOVScKgztMdy=-tD2HF-MvEhRmWxZuwQ@mail.gmail.com>
On 09/04/2011 05:52 PM, Blue Swirl wrote:
> Avoid this warning by clang analyzer by defining a default case:
> /src/qemu/hw/openpic.c:477:5: warning: Undefined or garbage value
> returned to caller
> return retval;
>
> Signed-off-by: Blue Swirl<blauwirbel@gmail.com>
> ---
> hw/openpic.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/openpic.c b/hw/openpic.c
> index 26c96e2..4b883ac 100644
> --- a/hw/openpic.c
> +++ b/hw/openpic.c
> @@ -469,6 +469,7 @@ static inline uint32_t read_IRQreg (openpic_t
> *opp, int n_IRQ, uint32_t reg)
> case IRQ_IPVP:
> retval = opp->src[n_IRQ].ipvp;
> break;
> + default:
> case IRQ_IDE:
> retval = opp->src[n_IRQ].ide;
> break;
Looks wrong, perhaps it should return 0?
Paolo
next prev parent reply other threads:[~2011-09-05 6:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 15:52 [Qemu-devel] [PATCH 7/9] openpic: avoid a warning from clang analyzer Blue Swirl
2011-09-05 6:48 ` Paolo Bonzini [this message]
2011-09-05 18:41 ` Blue Swirl
2011-09-07 11:38 ` Alexander Graf
2011-09-12 17:12 ` [Qemu-devel] [Qemu-ppc] " Scott Wood
2011-09-12 20:24 ` 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=4E6470AB.1080402@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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.