After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 420316 - Warning about shadowed member in glibmm/helperlist.h
Warning about shadowed member in glibmm/helperlist.h
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: general
2.12.x
Other All
: Normal minor
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2007-03-19 22:02 UTC by btb
Modified: 2007-03-23 17:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
change variable name to avoid shadowed member (771 bytes, patch)
2007-03-19 22:26 UTC, btb
none Details | Review

Description btb 2007-03-19 22:02:54 UTC
Please describe the problem:
When compiling applications with -Wshadow enabled, GCC gives the
following warning:

/usr/include/glibmm-2.4/glibmm/helperlist.h:40: warning: declaration of
‘gparent’ shadows a member of 'this'

Steps to reproduce:
1. compile one of the example programs with -Wshadow
for example:
g++ parser.cc -o parser `pkg-config glibmm-2.4 --cflags --libs`


Actual results:
warning of shadowed member is generated:

/usr/include/glibmm-2.4/glibmm/helperlist.h:40: warning: declaration of
‘gparent’ shadows a member of 'this'

Expected results:
compile without warnings

Does this happen every time?
yes

Other information:
fixed by simply changing the name of the variable used in the HelperList constructor.
Comment 1 btb 2007-03-19 22:26:36 UTC
Created attachment 84920 [details] [review]
change variable name to avoid shadowed member
Comment 2 Murray Cumming 2007-03-20 07:32:14 UTC
Feel free to commit this, with a comment next to the code about the shadow warning.
Comment 3 btb 2007-03-20 21:11:05 UTC
Unfortunately, I don't have commit access to svn. Would you like me to go ahead and request an account?
Comment 4 Murray Cumming 2007-03-23 17:33:29 UTC
Committed to glibmm-2-12 and svn trunk.