From: Paolo Bonzini <pbonzini@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] scsi: fix warning
Date: Fri, 10 Aug 2012 15:51:07 +0200 [thread overview]
Message-ID: <502511CB.40504@redhat.com> (raw)
In-Reply-To: <1344605205-28583-3-git-send-email-kraxel@redhat.com>
Il 10/08/2012 15:26, Gerd Hoffmann ha scritto:
> hw/scsi-bus.c:758: warning: ‘xfer’ may be used uninitialized in this
> function
>
> Isn't true, but older gcc versions (for example 4.1 as shipped in rhel5)
> are not clever enougth to figure, so sprinkle in a default: line to make
> them happy.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/scsi-bus.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
> index b8a857d..4981a02 100644
> --- a/hw/scsi-bus.c
> +++ b/hw/scsi-bus.c
> @@ -761,6 +761,7 @@ static int ata_passthrough_12_xfer_size(SCSIDevice *dev, uint8_t *buf)
> switch (length) {
> case 0:
> case 3: /* USB-specific. */
> + default:
> xfer = 0;
> break;
> case 1:
> @@ -784,6 +785,7 @@ static int ata_passthrough_16_xfer_size(SCSIDevice *dev, uint8_t *buf)
> switch (length) {
> case 0:
> case 3: /* USB-specific. */
> + default:
> xfer = 0;
> break;
> case 1:
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
prev parent reply other threads:[~2012-08-10 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 13:26 [Qemu-devel] [PATCH 0/2] two little build fixes Gerd Hoffmann
2012-08-10 13:26 ` [Qemu-devel] [PATCH 1/2] avoid asprintf (not available on mingw64) Gerd Hoffmann
2012-08-10 14:18 ` Markus Armbruster
2012-08-12 9:54 ` Blue Swirl
2012-08-13 5:46 ` Gerd Hoffmann
2012-08-10 13:26 ` [Qemu-devel] [PATCH 2/2] scsi: fix warning Gerd Hoffmann
2012-08-10 13:51 ` Paolo Bonzini [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=502511CB.40504@redhat.com \
--to=pbonzini@redhat.com \
--cc=kraxel@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 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.