Ticket #9900: 0001-spirit-fix-GCC-Wshadow-warnings.patch

File 0001-spirit-fix-GCC-Wshadow-warnings.patch, 4.2 KB (added by mstahl@…, 9 years ago)
  • include/boost/spirit/home/classic/core/non_terminal/subrule.hpp

    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  
    210210            subrule_list<
    211211                subrule_parser<ID2, DefT2, ContextT2>,
    212212                nil_t> >
    213         operator,(subrule_parser<ID2, DefT2, ContextT2> const& rhs) const
     213        operator,(subrule_parser<ID2, DefT2, ContextT2> const& rhs_) const
    214214        {
    215215            return subrule_list<
    216216                self_t,
    BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN  
    220220                        *this,
    221221                        subrule_list<
    222222                            subrule_parser<ID2, DefT2, ContextT2>, nil_t>(
    223                                 rhs, nil_t()));
     223                                rhs_, nil_t()));
    224224        }
    225225
    226226        typename DefT::embed_t rhs;
  • include/boost/spirit/home/classic/debug/impl/parser_names.ipp

    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  
    395395            }
    396396
    397397            bool register_node(void const *r, char const *name_to_register,
    398                 bool trace_node)
     398                bool trace_node_)
    399399            {
    400400                if (infos.find(r) != infos.end())
    401401                    return false;
    402402
    403403                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_))
    405405                ).second;
    406406            }
    407407
  • include/boost/spirit/home/classic/error_handling/exceptions.hpp

    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  
    126126        typedef unary<ParserT, parser<self_t> >         base_t;
    127127        typedef unary_parser_category                   parser_category_t;
    128128
    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_) {}
    131131
    132132        template <typename ScannerT>
    133133        struct result
  • include/boost/spirit/home/classic/symbols/symbols.hpp

    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:  
    102102    {
    103103        typedef typename ScannerT::iterator_t iterator_t;
    104104        iterator_t first = scan.first;
    105         typename SetT::search_info result = SetT::find(scan);
     105        typename SetT::search_info result_ = SetT::find(scan);
    106106
    107         if (result.data)
     107        if (result_.data)
    108108            return scan.
    109109                create_match(
    110                     result.length,
    111                     symbol_ref_t(*result.data),
     110                    result_.length,
     111                    symbol_ref_t(*result_.data),
    112112                    first,
    113113                    scan.first);
    114114        else