HI Michael,
I think you will get a whole ton of shadow warnings
like that, since I very regularly use the same name
for a constructor argument as the member variable
being initialized, writing something like "this->x = x;"
Perhaps this is a slightly risky programming style,
but certainly not a bug.
cheers,
David
On 24/06/2009, at 9:43 AM, Michael Ledford wrote:
> Hello,
>
> I am in the process of working Kakadu into a piece of software. We
> turn on some compiler warnings, in particular GCC_WARN_SHADOW, that
> are not on by default. I wonder if the warnings being generated by
> Kakadu should be considered potentially harmful? Shadowing variables
> in my experience can create strange bugs.
>
> Here are some examples of the warnings produced:
>
> kakadu/v6_1_1-00873N/coresys/common/kdu_elementary.h:630: warning:
> declaration of 'manual_reset' shadows a member of 'this'
> kakadu/v6_1_1-00873N/coresys/common/kdu_kernels.h:126: warning:
> declaration of 'reversible' shadows a member of 'this'
> kakadu/v6_1_1-00873N/coresys/common/kdu_kernels.h:126: warning:
> declaration of 'kernel_id' shadows a member of 'this'
>
> Should they be fixed?
>
> Sincerely,
> Michael
>
>
> ------------------------------------
>
> For problems with your subscription in this group please email
> kakadu_jpeg2000-owner@yahoogroups.com.
> Yahoo! Groups Links
>
>
>