qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 04/11] lsi53c895a: avoid a write only variab


From: Markus Armbruster
Subject: Re: [Qemu-devel] Re: [PATCH 04/11] lsi53c895a: avoid a write only variable
Date: Thu, 07 Oct 2010 11:20:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> On 10/06/2010 11:32 PM, Blue Swirl wrote:
>> 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 making the variable declaration and its uses also conditional
>> to debug definition.
>
> NACK, this uglifies the code and loses track of _what_ is that msgbyte
> we're reading.

Seconded.

If the warning bothers you, maybe "(void)len" can silence it in a less
unsightly manner.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]