Ticket #7432: boost-warnings.diff

File boost-warnings.diff, 11.8 KB (added by Franz Detro <franz.detro@…>, 10 years ago)
  • boost/circular_buffer/base.hpp

    From 119f040e89e698c2d557465a224853ab68e4690b Mon Sep 17 00:00:00 2001
    From: Franz Detro <franz.detro@native-instruments.de>
    Date: Tue, 4 Sep 2012 15:19:47 +0200
    Subject: [PATCH] fix warnings in some more boost libraries
    
    ---
     boost/circular_buffer/base.hpp              |  2 +-
     boost/circular_buffer/space_optimized.hpp   |  4 ++--
     boost/detail/utf8_codecvt_facet.hpp         |  2 ++
     boost/lambda/detail/ret.hpp                 |  2 +-
     boost/multi_index/detail/index_matcher.hpp  |  8 ++++----
     boost/multi_index/ordered_index.hpp         | 20 ++++++++++----------
     boost/optional/optional.hpp                 |  4 ++--
     boost/parameter/aux_/tagged_argument.hpp    |  4 ++--
     boost/regex/v4/basic_regex_parser.hpp       |  2 +-
     boost/serialization/smart_cast.hpp          |  2 +-
     boost/token_functions.hpp                   |  2 +-
     boost/xpressive/match_results.hpp           |  2 +-
     boost/xpressive/traits/cpp_regex_traits.hpp |  6 +++---
     13 files changed, 31 insertions(+), 29 deletions(-)
    
    diff --git a/boost/circular_buffer/base.hpp b/boost/circular_buffer/base.hpp
    index 3b9886a..4893cb2 100644
    a b private:  
    23162316    }
    23172317
    23182318    //! Specialized method for swapping the allocator.
    2319     void swap_allocator(circular_buffer<T, Alloc>& cb, const true_type&) {
     2319    void swap_allocator(circular_buffer<T, Alloc>&, const true_type&) {
    23202320        // Swap is not needed because allocators have no state.
    23212321    }
    23222322
  • boost/circular_buffer/space_optimized.hpp

    diff --git a/boost/circular_buffer/space_optimized.hpp b/boost/circular_buffer/space_optimized.hpp
    index 9c76afe..5350676 100644
    a b private:  
    13001300
    13011301    //! Specialized method for determining the initial capacity.
    13021302    template <class IntegralType>
    1303     static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType item,
     1303    static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType,
    13041304        const true_type&) {
    13051305        return init_capacity(capacity_ctrl, static_cast<size_type>(n));
    13061306    }
    private:  
    13201320
    13211321    //! Specialized method for determining the initial capacity.
    13221322    template <class InputIterator>
    1323     static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator first, InputIterator last,
     1323    static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator, InputIterator,
    13241324        const std::input_iterator_tag&) {
    13251325        return capacity_ctrl.capacity();
    13261326    }
  • boost/detail/utf8_codecvt_facet.hpp

    diff --git a/boost/detail/utf8_codecvt_facet.hpp b/boost/detail/utf8_codecvt_facet.hpp
    index b777ff9..592e70c 100644
    a b protected:  
    179179        ) const;
    180180#endif
    181181
     182    using std::codecvt<wchar_t, char, std::mbstate_t>::do_length;
     183
    182184    // Largest possible value do_length(state,from,from_end,1) could return.
    183185    virtual int do_max_length() const throw () {
    184186        return 6; // largest UTF-8 encoding of a UCS-4 character
  • boost/lambda/detail/ret.hpp

    diff --git a/boost/lambda/detail/ret.hpp b/boost/lambda/detail/ret.hpp
    index fbd8b3a..c02e7be 100644
    a b inline const  
    284284lambda_functor<
    285285  lambda_functor_base<do_nothing_action, null_type>
    286286>
    287 make_void(const Arg1& a1) {
     287make_void(const Arg1& /*a1*/) {
    288288return
    289289    lambda_functor_base<do_nothing_action, null_type>();
    290290}
  • boost/multi_index/detail/index_matcher.hpp

    diff --git a/boost/multi_index/detail/index_matcher.hpp b/boost/multi_index/detail/index_matcher.hpp
    index 5828137..1c03144 100644
    a b protected:  
    132132        entries(),entries()+size_,
    133133        entry(node),entry::less_by_node()); /* localize entry */
    134134    ent->ordered=false;
    135     std::size_t n=ent->pos;                 /* get its position */
     135    std::size_t np=ent->pos;                 /* get its position */
    136136
    137137    entry dummy(0);
    138     dummy.pile_top=n;
     138    dummy.pile_top=np;
    139139
    140140    entry* pile_ent=                        /* find the first available pile */
    141141      std::lower_bound(                     /* to stack the entry            */
    142142        entries(),entries()+num_piles,
    143143        dummy,entry::less_by_pile_top());
    144144
    145     pile_ent->pile_top=n;                   /* stack the entry */
     145    pile_ent->pile_top=np;                   /* stack the entry */
    146146    pile_ent->pile_top_entry=ent;       
    147147
    148148    /* if not the first pile, link entry to top of the preceding pile */
    protected:  
    164164       */
    165165
    166166      entry* ent=entries()[num_piles-1].pile_top_entry;
    167       for(std::size_t n=num_piles;n--;){
     167      for(std::size_t np=num_piles;np--;){
    168168        ent->ordered=true;
    169169        ent=ent->previous;
    170170      }
  • boost/multi_index/ordered_index.hpp

    diff --git a/boost/multi_index/ordered_index.hpp b/boost/multi_index/ordered_index.hpp
    index 20475e0..23308fb 100644
    a b public:  
    438438
    439439  template<typename CompatibleKey,typename CompatibleCompare>
    440440  iterator find(
    441     const CompatibleKey& x,const CompatibleCompare& comp)const
     441    const CompatibleKey& x,const CompatibleCompare& comp_)const
    442442  {
    443     return make_iterator(ordered_index_find(root(),header(),key,x,comp));
     443    return make_iterator(ordered_index_find(root(),header(),key,x,comp_));
    444444  }
    445445
    446446  template<typename CompatibleKey>
    public:  
    450450  }
    451451
    452452  template<typename CompatibleKey,typename CompatibleCompare>
    453   size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const
     453  size_type count(const CompatibleKey& x,const CompatibleCompare& comp_)const
    454454  {
    455     std::pair<iterator,iterator> p=equal_range(x,comp);
     455    std::pair<iterator,iterator> p=equal_range(x,comp_);
    456456    size_type n=std::distance(p.first,p.second);
    457457    return n;
    458458  }
    public:  
    466466
    467467  template<typename CompatibleKey,typename CompatibleCompare>
    468468  iterator lower_bound(
    469     const CompatibleKey& x,const CompatibleCompare& comp)const
     469    const CompatibleKey& x,const CompatibleCompare& comp_)const
    470470  {
    471471    return make_iterator(
    472       ordered_index_lower_bound(root(),header(),key,x,comp));
     472      ordered_index_lower_bound(root(),header(),key,x,comp_));
    473473  }
    474474
    475475  template<typename CompatibleKey>
    public:  
    481481
    482482  template<typename CompatibleKey,typename CompatibleCompare>
    483483  iterator upper_bound(
    484     const CompatibleKey& x,const CompatibleCompare& comp)const
     484    const CompatibleKey& x,const CompatibleCompare& comp_)const
    485485  {
    486486    return make_iterator(
    487       ordered_index_upper_bound(root(),header(),key,x,comp));
     487      ordered_index_upper_bound(root(),header(),key,x,comp_));
    488488  }
    489489
    490490  template<typename CompatibleKey>
    public:  
    499499
    500500  template<typename CompatibleKey,typename CompatibleCompare>
    501501  std::pair<iterator,iterator> equal_range(
    502     const CompatibleKey& x,const CompatibleCompare& comp)const
     502    const CompatibleKey& x,const CompatibleCompare& comp_)const
    503503  {
    504504    std::pair<node_type*,node_type*> p=
    505       ordered_index_equal_range(root(),header(),key,x,comp);
     505      ordered_index_equal_range(root(),header(),key,x,comp_);
    506506    return std::pair<iterator,iterator>(
    507507      make_iterator(p.first),make_iterator(p.second));
    508508  }
  • boost/optional/optional.hpp

    diff --git a/boost/optional/optional.hpp b/boost/optional/optional.hpp
    index ec9006e..e3d4245 100644
    a b bool operator >= ( optional<T> const& x, none_t y )  
    890890
    891891template<class T>
    892892inline
    893 bool operator == ( none_t x, optional<T> const& y )
     893bool operator == ( none_t, optional<T> const& y )
    894894{ return equal_pointees(optional<T>() ,y); }
    895895
    896896template<class T>
    897897inline
    898 bool operator < ( none_t x, optional<T> const& y )
     898bool operator < ( none_t, optional<T> const& y )
    899899{ return less_pointees(optional<T>() ,y); }
    900900
    901901template<class T>
  • boost/parameter/aux_/tagged_argument.hpp

    diff --git a/boost/parameter/aux_/tagged_argument.hpp b/boost/parameter/aux_/tagged_argument.hpp
    index 6248be2..54b63ab 100644
    a b struct tagged_argument : tagged_argument_base  
    120120    }
    121121# else
    122122    template <class Default>
    123     reference operator[](default_<key_type,Default> const& x) const
     123    reference operator[](default_<key_type,Default> const&) const
    124124    {
    125125        return value;
    126126    }
    127127
    128128    template <class F>
    129     reference operator[](lazy_default<key_type,F> const& x) const
     129    reference operator[](lazy_default<key_type,F> const&) const
    130130    {
    131131        return value;
    132132    }
  • boost/regex/v4/basic_regex_parser.hpp

    diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
    index 72dc4ee..5dfb81e 100644
    a b bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)  
    11071107      }
    11081108      // get the value if any:
    11091109      v = this->m_traits.toi(m_position, m_end, 10);
    1110       max = (v >= 0) ? v : (std::numeric_limits<std::size_t>::max)();
     1110      max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
    11111111   }
    11121112   else
    11131113   {
  • boost/serialization/smart_cast.hpp

    diff --git a/boost/serialization/smart_cast.hpp b/boost/serialization/smart_cast.hpp
    index c240a55..61bd3ed 100644
    a b namespace smart_cast_impl {  
    249249        // cast on a system which doesn't support partial template
    250250        // specialization
    251251        template<class U>
    252         static T cast(U u){
     252        static T cast(U){
    253253            BOOST_STATIC_ASSERT(sizeof(T)==0);
    254254            return * static_cast<T *>(NULL);
    255255        }
  • boost/token_functions.hpp

    diff --git a/boost/token_functions.hpp b/boost/token_functions.hpp
    index 4d1a1df..1f24efa 100644
    a b namespace boost{  
    309309  template <>
    310310  struct assign_or_plus_equal<std::input_iterator_tag> {
    311311    template<class Iterator, class Token>
    312     static void assign(Iterator b, Iterator e, Token &t) { }
     312    static void assign(Iterator, Iterator, Token &) { }
    313313    template<class Token, class Value>
    314314    static void plus_equal(Token &t, const Value &v) {
    315315      t += v;
  • boost/xpressive/match_results.hpp

    diff --git a/boost/xpressive/match_results.hpp b/boost/xpressive/match_results.hpp
    index 6e9516d..ae1cd40 100644
    a b private:  
    934934    (
    935935        OutputIterator out
    936936      , Expr const &format
    937       , regex_constants::match_flag_type flags
     937      , regex_constants::match_flag_type
    938938      , mpl::size_t<4>
    939939    ) const
    940940    {
  • boost/xpressive/traits/cpp_regex_traits.hpp

    diff --git a/boost/xpressive/traits/cpp_regex_traits.hpp b/boost/xpressive/traits/cpp_regex_traits.hpp
    index 74a904c..751ec13 100644
    a b struct cpp_regex_traits  
    467467    ///
    468468    /// \attention Not currently used
    469469    template<typename FwdIter>
    470     string_type transform(FwdIter begin, FwdIter end) const
     470    string_type transform(FwdIter, FwdIter) const
    471471    {
    472472        //string_type str(begin, end);
    473473        //return this->transform(str.data(), str.data() + str.size());
    struct cpp_regex_traits  
    483483    ///
    484484    /// \attention Not currently used
    485485    template<typename FwdIter>
    486     string_type transform_primary(FwdIter begin, FwdIter end) const
     486    string_type transform_primary(FwdIter, FwdIter ) const
    487487    {
    488488        BOOST_ASSERT(false); // TODO implement me
    489489        return string_type();
    struct cpp_regex_traits  
    495495    ///
    496496    /// \attention Not currently used
    497497    template<typename FwdIter>
    498     string_type lookup_collatename(FwdIter begin, FwdIter end) const
     498    string_type lookup_collatename(FwdIter, FwdIter) const
    499499    {
    500500        BOOST_ASSERT(false); // TODO implement me
    501501        return string_type();