Squish warning about shadowed variable in GCC 4.1.2 (CentOS 5)
Brought to you by:
redi
Some old GCCs complain about a parameter in an inner class's member function shadowing a variable of the same name in the function where that class is defined:
test_pstreams.cc: In constructor ‘main()::pguard::pguard(redi::ipstream&, int)’: test_pstreams.cc:827: warning: declaration of ‘in’ shadows a previous local test_pstreams.cc:802: warning: shadowed declaration is here
Since warnings are being treated as errors, the test program's build fails. The attached patch fixes it by renaming the inner class's ctor parameter.
About time I got to send you a patch, Jonathan. :)
Thanks! I think I'll rename it to something else, as I'm using a trailing underscore for member variables. Maybe "istrm" or something like that.
Fixed in 625d4a5caa71e0256947711568fb1005831dddb9 - thanks