GNOME Bugzilla – Bug 420316
Warning about shadowed member in glibmm/helperlist.h
Last modified: 2007-03-23 17:33:29 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.
Created attachment 84920 [details] [review] change variable name to avoid shadowed member
Feel free to commit this, with a comment next to the code about the shadow warning.
Unfortunately, I don't have commit access to svn. Would you like me to go ahead and request an account?
Committed to glibmm-2-12 and svn trunk.