[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 10/11] ppc: avoid write only variables
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Re: [PATCH 10/11] ppc: avoid write only variables |
Date: |
Thu, 07 Oct 2010 14:33:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Alexander Graf <address@hidden> writes:
> On 06.10.2010, at 23:34, Blue Swirl wrote:
>
>> Compiling with GCC 4.6.0 20100925 produced warnings:
>> /src/qemu/target-ppc/op_helper.c: In function 'helper_icbi':
>> /src/qemu/target-ppc/op_helper.c:351:14: error: variable 'tmp' set but
>> not used [-Werror=unused-but-set-variable]
>> /src/qemu/target-ppc/op_helper.c: In function 'do_6xx_tlb':
>> /src/qemu/target-ppc/op_helper.c:3805:28: error: variable 'EPN' set
>> but not used [-Werror=unused-but-set-variable]
>> /src/qemu/target-ppc/op_helper.c: In function 'do_74xx_tlb':
>> /src/qemu/target-ppc/op_helper.c:3838:28: error: variable 'EPN' set
>> but not used [-Werror=unused-but-set-variable]
>>
>> Fix by making the variable declarations and their uses also conditional
>> to debug definition. Delete tmp.
>
> Maybe it would make more sense to get those LOG_* macros into static inline
> functions. But for the issue at hand, the solution looks good to me.
Or simply (void)EPN.