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


Reply via email to