From 36dce4ab0ecc7059ce7cdea2633845a8bf12812f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 12 Apr 2014 00:44:03 +0200 Subject: [PATCH 1/2] spirit: fix GCC -Wshadow warnings Signed-off-by: Michael Stahl --- include/boost/spirit/home/classic/core/non_terminal/subrule.hpp | 4 ++-- include/boost/spirit/home/classic/debug/impl/parser_names.ipp | 4 ++-- include/boost/spirit/home/classic/error_handling/exceptions.hpp | 4 ++-- include/boost/spirit/home/classic/symbols/symbols.hpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp b/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp index 8b25d8d..4a4ab57 100644 --- a/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp +++ b/include/boost/spirit/home/classic/core/non_terminal/subrule.hpp @@ -210,7 +210,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN subrule_list< subrule_parser, nil_t> > - operator,(subrule_parser const& rhs) const + operator,(subrule_parser const& rhs_) const { return subrule_list< self_t, @@ -220,7 +220,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN *this, subrule_list< subrule_parser, nil_t>( - rhs, nil_t())); + rhs_, nil_t())); } typename DefT::embed_t rhs; diff --git a/include/boost/spirit/home/classic/debug/impl/parser_names.ipp b/include/boost/spirit/home/classic/debug/impl/parser_names.ipp index 5d75be2..1b228cf 100644 --- a/include/boost/spirit/home/classic/debug/impl/parser_names.ipp +++ b/include/boost/spirit/home/classic/debug/impl/parser_names.ipp @@ -395,13 +395,13 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN } bool register_node(void const *r, char const *name_to_register, - bool trace_node) + bool trace_node_) { if (infos.find(r) != infos.end()) return false; return infos.insert(rule_infos::value_type(r, - rule_info(std::string(name_to_register), trace_node)) + rule_info(std::string(name_to_register), trace_node_)) ).second; } diff --git a/include/boost/spirit/home/classic/error_handling/exceptions.hpp b/include/boost/spirit/home/classic/error_handling/exceptions.hpp index c2e0c86..4d7cb76 100644 --- a/include/boost/spirit/home/classic/error_handling/exceptions.hpp +++ b/include/boost/spirit/home/classic/error_handling/exceptions.hpp @@ -126,8 +126,8 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN typedef unary > base_t; typedef unary_parser_category parser_category_t; - assertive_parser(ParserT const& parser, ErrorDescrT descriptor_) - : base_t(parser), descriptor(descriptor_) {} + assertive_parser(ParserT const& parser_, ErrorDescrT descriptor_) + : base_t(parser_), descriptor(descriptor_) {} template struct result diff --git a/include/boost/spirit/home/classic/symbols/symbols.hpp b/include/boost/spirit/home/classic/symbols/symbols.hpp index 8605585..f4cb3b7 100644 --- a/include/boost/spirit/home/classic/symbols/symbols.hpp +++ b/include/boost/spirit/home/classic/symbols/symbols.hpp @@ -102,13 +102,13 @@ public: { typedef typename ScannerT::iterator_t iterator_t; iterator_t first = scan.first; - typename SetT::search_info result = SetT::find(scan); + typename SetT::search_info result_ = SetT::find(scan); - if (result.data) + if (result_.data) return scan. create_match( - result.length, - symbol_ref_t(*result.data), + result_.length, + symbol_ref_t(*result_.data), first, scan.first); else -- 1.8.3.1