[Boost-bugs] [Boost C++ Libraries] #7568: Unused parameter and shadowed member warnings in errors.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #7568: Unused parameter and shadowed member warnings in errors.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-24 21:24:06


#7568: Unused parameter and shadowed member warnings in errors.hpp
--------------------------------------------------+-------------------------
 Reporter: Kenneth Moreland <kmorel@…> | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.51.0 | Severity: Cosmetic
 Keywords: |
--------------------------------------------------+-------------------------
 This code


 {{{
 #include <boost/program_options/errors.hpp>

 int main(int, char *[]) { return 0; }
 }}}

 compiled with


 {{{
 gcc -I/path/to/boost -c -Wunused-parameter -Wshadow test.cxx
 }}}

 produces a warning about an unused parameter and several warnings about
 shadowed class members:

 {{{
 /opt/local/include/boost/program_options/errors.hpp:253: warning: unused
 parameter 'option_name'
 /opt/local/include/boost/program_options/errors.hpp: In constructor
 'boost::program_options::invalid_syntax::invalid_syntax(boost::program_options::invalid_syntax::kind_t,
 const std::string&, const std::string&, int)':
 /opt/local/include/boost/program_options/errors.hpp:311: warning:
 declaration of 'kind' shadows a member of 'this'
 /opt/local/include/boost/program_options/errors.hpp: In constructor
 'boost::program_options::invalid_config_file_syntax::invalid_config_file_syntax(const
 std::string&, boost::program_options::invalid_syntax::kind_t)':
 /opt/local/include/boost/program_options/errors.hpp:331: warning:
 declaration of 'kind' shadows a member of 'this'
 /opt/local/include/boost/program_options/errors.hpp: In constructor
 'boost::program_options::invalid_command_line_syntax::invalid_command_line_syntax(boost::program_options::invalid_syntax::kind_t,
 const std::string&, const std::string&, int)':
 /opt/local/include/boost/program_options/errors.hpp:350: warning:
 declaration of 'kind' shadows a member of 'this'
 }}}

 This was compile on Mac Snow Leopard, gcc 4.2.1 with the boost
 distribution from macports (although I doubt any of that matters).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7568>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC