From: Yaniv Kaul <ykaul@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Patch for 'set but not used' variable in atapi.c
Date: Wed, 27 Apr 2011 21:37:03 +0300 [thread overview]
Message-ID: <4DB8624F.9060504@redhat.com> (raw)
I'm pretty sure it's not in the right format, without signed-off, etc,
but perhaps it could be put into the trivial or block branches.
Fixes the following error (with gcc 4.6, default settings):
/home/ykaul/qemu/hw/ide/atapi.c: In function ‘ide_atapi_cmd’:
/home/ykaul/qemu/hw/ide/atapi.c:1083:20: error: variable ‘packet’ set
but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Regretfully, there are more to fix, with or without KVM support. The tcg
one puzzles me a bit:
CC x86_64-softmmu/tcg/tcg.o
/home/ykaul/qemu/tcg/tcg.c: In function ‘tcg_gen_callN’:
/home/ykaul/qemu/tcg/tcg.c:589:9: error: variable ‘call_type’ set but
not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Removing the variable and the set line actually works, although I see
the variables used few lines later. Some #ifdef I'm not seeing, probably.
Thanks,
Y.
Signed-off-by: Yaniv Kaul<address@hidden>
---
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 690a0ab..334d6fd 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -1080,10 +1080,12 @@ static const struct {
void ide_atapi_cmd(IDEState *s)
{
- const uint8_t *packet;
uint8_t *buf;
+#ifdef DEBUG_IDE_ATAPI
+ const uint8_t *packet;
packet = s->io_buffer;
+#endif
buf = s->io_buffer;
#ifdef DEBUG_IDE_ATAPI
{
reply other threads:[~2011-04-27 18:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4DB8624F.9060504@redhat.com \
--to=ykaul@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.