[Top][All Lists]

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

[Qemu-devel] Re: [PATCH] microblaze: fix build on Ubuntu Hardy

From: Thomas Monjalon
Subject: [Qemu-devel] Re: [PATCH] microblaze: fix build on Ubuntu Hardy
Date: Fri, 9 Apr 2010 17:31:24 +0200
User-agent: KMail/1.9.10

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 
    /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.


reply via email to

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