sim-card
/
qemu
Archived
10
0
Fork 0

lsi53c895a: avoid a write only variable

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>
This commit is contained in:
Blue Swirl 2010-10-13 18:38:07 +00:00
parent ef4760626e
commit f3f5b86725
1 changed files with 1 additions and 0 deletions

View File

@ -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: