From 36dce4ab0ecc7059ce7cdea2633845a8bf12812f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sat, 12 Apr 2014 00:44:03 +0200
Subject: [PATCH 1/2] spirit: fix GCC -Wshadow warnings
Signed-off-by: Michael Stahl <mstahl@redhat.com>
---
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
|
b
|
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
210 | 210 | subrule_list< |
211 | 211 | subrule_parser<ID2, DefT2, ContextT2>, |
212 | 212 | nil_t> > |
213 | | operator,(subrule_parser<ID2, DefT2, ContextT2> const& rhs) const |
| 213 | operator,(subrule_parser<ID2, DefT2, ContextT2> const& rhs_) const |
214 | 214 | { |
215 | 215 | return subrule_list< |
216 | 216 | self_t, |
… |
… |
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
220 | 220 | *this, |
221 | 221 | subrule_list< |
222 | 222 | subrule_parser<ID2, DefT2, ContextT2>, nil_t>( |
223 | | rhs, nil_t())); |
| 223 | rhs_, nil_t())); |
224 | 224 | } |
225 | 225 | |
226 | 226 | 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
|
b
|
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
395 | 395 | } |
396 | 396 | |
397 | 397 | bool register_node(void const *r, char const *name_to_register, |
398 | | bool trace_node) |
| 398 | bool trace_node_) |
399 | 399 | { |
400 | 400 | if (infos.find(r) != infos.end()) |
401 | 401 | return false; |
402 | 402 | |
403 | 403 | return infos.insert(rule_infos::value_type(r, |
404 | | rule_info(std::string(name_to_register), trace_node)) |
| 404 | rule_info(std::string(name_to_register), trace_node_)) |
405 | 405 | ).second; |
406 | 406 | } |
407 | 407 | |
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
|
b
|
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
126 | 126 | typedef unary<ParserT, parser<self_t> > base_t; |
127 | 127 | typedef unary_parser_category parser_category_t; |
128 | 128 | |
129 | | assertive_parser(ParserT const& parser, ErrorDescrT descriptor_) |
130 | | : base_t(parser), descriptor(descriptor_) {} |
| 129 | assertive_parser(ParserT const& parser_, ErrorDescrT descriptor_) |
| 130 | : base_t(parser_), descriptor(descriptor_) {} |
131 | 131 | |
132 | 132 | template <typename ScannerT> |
133 | 133 | 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
|
b
|
public:
|
102 | 102 | { |
103 | 103 | typedef typename ScannerT::iterator_t iterator_t; |
104 | 104 | iterator_t first = scan.first; |
105 | | typename SetT::search_info result = SetT::find(scan); |
| 105 | typename SetT::search_info result_ = SetT::find(scan); |
106 | 106 | |
107 | | if (result.data) |
| 107 | if (result_.data) |
108 | 108 | return scan. |
109 | 109 | create_match( |
110 | | result.length, |
111 | | symbol_ref_t(*result.data), |
| 110 | result_.length, |
| 111 | symbol_ref_t(*result_.data), |
112 | 112 | first, |
113 | 113 | scan.first); |
114 | 114 | else |