Search the web
Sign In
New User? Sign Up
kakadu_jpeg2000 · Kakadu JPEG2000 Discussion Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Warnings during compilation...   Message List  
Reply | Forward Message #5799 of 5971 |
Re: [kakadu_jpeg2000] Warnings during compilation...

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



Fri Jul 3, 2009 2:17 am

taubman_ds
Offline Offline
Send Email Send Email

Forward
Message #5799 of 5971 |
Expand Messages Author Sort by Date

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...
Michael Ledford
michael.ledford
Offline Send Email
Jun 29, 2009
1:54 pm

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...
David Taubman
taubman_ds
Offline Send Email
Jul 3, 2009
2:39 am

... Hi Dr. Taubman, I do in fact get a copious amount of warnings, I simply wanted to point out a few. I wanted to inquire as to the changing of the ...
Michael Ledford
michael.ledford
Offline Send Email
Jul 15, 2009
5:06 am

Hmm, not sure right now. I guess I could go through all the headers and use alternate names, but it is a bit of a nuisance. I'll keep it in mind for the next...
David Taubman
taubman_ds
Offline Send Email
Jul 20, 2009
6:48 am

One common convention is to use a prefix (such as "m_") for all member variables. This makes it dead simple to tell them apart from local variables even if...
mikeunverferth
Offline
Jul 20, 2009
1:20 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help