Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0GBA-00081n-MR for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:31:32 -0400 Received: from [140.186.70.92] (port=49465 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0GB9-00080v-6T for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:31:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0GB7-0000qr-4G for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:31:30 -0400 Received: from mail.corp.accelance.fr ([213.162.48.15]:56550) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0GB6-0000qX-U9 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:31:29 -0400 From: Thomas Monjalon Date: Fri, 9 Apr 2010 17:31:24 +0200 References: <1270765360-5008-1-git-send-email-thomas_ml@monjalon.net> <4BBECC72.5080803@redhat.com> In-Reply-To: <4BBECC72.5080803@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201004091731.25184.thomas_ml@monjalon.net> Subject: [Qemu-devel] Re: [PATCH] microblaze: fix build on Ubuntu Hardy List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Paul Brook Paolo Bonzini wrote: > On 04/09/2010 12:22 AM, Thomas Monjalon wrote: > > Using GCC-4.2.4-1ubuntu4, there were 3 warnings. > > The last two are correct, but what was the first error? If it was a > shadowed declaration as it seems to be, the solution is to > s/fprintf/fprintf_func/ throughout print_insn_microblaze (for example). Paul, Paolo, you're right. Nice review ! The error message is: microblaze-dis.c:792: warning: unused variable 'fprintf' But the error message is bogus. It is a shadowed declaration. By adding -Wshadow, the message is: microblaze-dis.c:792: warning: declaration of 'fprintf' shadows a global declaration /usr/include/stdio.h:332: warning: shadowed declaration is here microblaze-dis.c:792: warning: unused variable 'fprintf' Since the function fprintf is used, removing this declaration is a wrong fix. I am going to send a new patch which renames the variable to fprintf_func as Paolo suggests. Thanks -- Thomas