qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 04/12] lsi53c895a: avoid a write only variable
@ 2010-10-08 21:23 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2010-10-08 21:23 UTC (permalink / raw)
  To: qemu-devel

Compiling with GCC 4.6.0 20100925 produced a warning:
/src/qemu/hw/lsi53c895a.c: In function 'lsi_do_msgout':
/src/qemu/hw/lsi53c895a.c:848:9: error: variable 'len' set but not
used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the variable is not unused for
non-debug case.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/lsi53c895a.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 5eaf69e..f97335e 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -864,6 +864,7 @@ static void lsi_do_msgout(LSIState *s)
         case 0x01:
             len = lsi_get_msgbyte(s);
             msg = lsi_get_msgbyte(s);
+            (void)len; /* avoid a warning about unused variable*/
             DPRINTF("Extended message 0x%x (len %d)\n", msg, len);
             switch (msg) {
             case 1:
-- 
1.6.2.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-08 21:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 21:23 [Qemu-devel] [PATCH 04/12] lsi53c895a: avoid a write only variable Blue Swirl

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).