From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56181 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3phS-0007QX-Ob for qemu-devel@nongnu.org; Thu, 07 Oct 2010 08:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3phR-0008VI-MU for qemu-devel@nongnu.org; Thu, 07 Oct 2010 08:35:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3phR-0008VD-G1 for qemu-devel@nongnu.org; Thu, 07 Oct 2010 08:35:53 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] Re: [PATCH 11/11] mips: avoid write only variables References: <4CAD76C2.1060605@redhat.com> Date: Thu, 07 Oct 2010 14:35:50 +0200 In-Reply-To: <4CAD76C2.1060605@redhat.com> (Paolo Bonzini's message of "Thu, 07 Oct 2010 09:29:06 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , qemu-devel Paolo Bonzini writes: > On 10/06/2010 11:34 PM, Blue Swirl wrote: >> Compiling with GCC 4.6.0 20100925 produced a lot of warnings like: >> /src/qemu/target-mips/translate.c: In function 'gen_ld': >> /src/qemu/target-mips/translate.c:1039:17: error: variable 'opn' set >> but not used [-Werror=unused-but-set-variable] >> >> Fix by making the variable declarations and uses conditional to debugging. > > What about a set_opn macro instead of this one-off "D" idiom? Even simpler: a few judiciously placed (void)opn.