Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83980 - in trunk: boost/regex boost/regex/pending boost/regex/v4 libs/regex/test/regress
From: john_at_[hidden]
Date: 2013-04-20 08:14:37


Author: johnmaddock
Date: 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
New Revision: 83980
URL: http://svn.boost.org/trac/boost/changeset/83980

Log:
Fix misc. GCC-4.8 warnings. Refs #8184
Text files modified:
   trunk/boost/regex/icu.hpp | 8 ++++----
   trunk/boost/regex/pending/static_mutex.hpp | 15 +++++++--------
   trunk/boost/regex/v4/regex_format.hpp | 4 ++--
   trunk/boost/regex/v4/regex_split.hpp | 2 +-
   trunk/libs/regex/test/regress/test_icu.cpp | 6 +++---
   trunk/libs/regex/test/regress/test_regex_search.hpp | 2 +-
   6 files changed, 18 insertions(+), 19 deletions(-)

Modified: trunk/boost/regex/icu.hpp
==============================================================================
--- trunk/boost/regex/icu.hpp (original)
+++ trunk/boost/regex/icu.hpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -423,7 +423,7 @@
 {
    typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type> match_type;
- typedef typename match_type::allocator_type alloc_type;
+ //typedef typename match_type::allocator_type alloc_type;
    match_type what;
    bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
    // copy results across to m:
@@ -439,7 +439,7 @@
 {
    typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type> match_type;
- typedef typename match_type::allocator_type alloc_type;
+ //typedef typename match_type::allocator_type alloc_type;
    match_type what;
    bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
    // copy results across to m:
@@ -598,7 +598,7 @@
 {
    typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type> match_type;
- typedef typename match_type::allocator_type alloc_type;
+ //typedef typename match_type::allocator_type alloc_type;
    match_type what;
    bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:
@@ -615,7 +615,7 @@
 {
    typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type> match_type;
- typedef typename match_type::allocator_type alloc_type;
+ //typedef typename match_type::allocator_type alloc_type;
    match_type what;
    bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:

Modified: trunk/boost/regex/pending/static_mutex.hpp
==============================================================================
--- trunk/boost/regex/pending/static_mutex.hpp (original)
+++ trunk/boost/regex/pending/static_mutex.hpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -36,14 +36,7 @@
 //
 namespace boost{
 
-class BOOST_REGEX_DECL scoped_static_mutex_lock;
-
-class static_mutex
-{
-public:
- typedef scoped_static_mutex_lock scoped_lock;
- pthread_mutex_t m_mutex;
-};
+class static_mutex;
 
 #define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, }
 
@@ -67,6 +60,12 @@
    bool m_have_lock;
 };
 
+class static_mutex
+{
+public:
+ typedef scoped_static_mutex_lock scoped_lock;
+ pthread_mutex_t m_mutex;
+};
 
 } // namespace boost
 #elif defined(BOOST_HAS_WINTHREADS)

Modified: trunk/boost/regex/v4/regex_format.hpp
==============================================================================
--- trunk/boost/regex/v4/regex_format.hpp (original)
+++ trunk/boost/regex/v4/regex_format.hpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -1064,7 +1064,7 @@
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
    {
- typedef typename Match::char_type char_type;
+ //typedef typename Match::char_type char_type;
       const charT* end = func;
       while(*end) ++end;
       return regex_format_imp(i, m, func, end, f, t);
@@ -1083,7 +1083,7 @@
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
    {
- typedef typename Match::char_type char_type;
+ //typedef typename Match::char_type char_type;
       return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t);
    }
 private:

Modified: trunk/boost/regex/v4/regex_split.hpp
==============================================================================
--- trunk/boost/regex/v4/regex_split.hpp (original)
+++ trunk/boost/regex/v4/regex_split.hpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -107,7 +107,7 @@
                    std::size_t max_split)
 {
    typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
- typedef typename match_results<ci_t>::allocator_type match_allocator;
+ //typedef typename match_results<ci_t>::allocator_type match_allocator;
    ci_t last = s.begin();
    std::size_t init_size = max_split;
    re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1> pred(&last, &out, &max_split);

Modified: trunk/libs/regex/test/regress/test_icu.cpp
==============================================================================
--- trunk/libs/regex/test/regress/test_icu.cpp (original)
+++ trunk/libs/regex/test/regress/test_icu.cpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -73,7 +73,7 @@
    typedef typename MR2::value_type MR2_value_type;
    typedef typename MR2_value_type::const_iterator MR2_iterator_type;
    typedef boost::u16_to_u32_iterator<MR2_iterator_type> iterator_type;
- typedef typename MR1::size_type size_type;
+ //typedef typename MR1::size_type size_type;
    if(w1.size() != w2.size())
    {
       BOOST_REGEX_TEST_ERROR("Size mismatch in match_results class", UChar32);
@@ -103,7 +103,7 @@
    typedef typename MR2::value_type MR2_value_type;
    typedef typename MR2_value_type::const_iterator MR2_iterator_type;
    typedef boost::u8_to_u32_iterator<MR2_iterator_type> iterator_type;
- typedef typename MR1::size_type size_type;
+ //typedef typename MR1::size_type size_type;
    if(w1.size() != w2.size())
    {
       BOOST_REGEX_TEST_ERROR("Size mismatch in match_results class", UChar32);
@@ -358,7 +358,7 @@
 
 void test_icu(const wchar_t&, const test_invalid_regex_tag&)
 {
- typedef boost::u16_to_u32_iterator<std::wstring::const_iterator, ::UChar32> conv_iterator;
+ //typedef boost::u16_to_u32_iterator<std::wstring::const_iterator, ::UChar32> conv_iterator;
    std::vector< ::UChar32> expression;
 #ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
    expression.assign(test_info<wchar_t>::expression().begin(), test_info<wchar_t>::expression().end());

Modified: trunk/libs/regex/test/regress/test_regex_search.hpp
==============================================================================
--- trunk/libs/regex/test/regress/test_regex_search.hpp (original)
+++ trunk/libs/regex/test/regress/test_regex_search.hpp 2013-04-20 08:14:36 EDT (Sat, 20 Apr 2013)
@@ -422,7 +422,7 @@
 template<class charT, class traits>
 void test_regex_grep(boost::basic_regex<charT, traits>& r)
 {
- typedef typename std::basic_string<charT>::const_iterator const_iterator;
+ //typedef typename std::basic_string<charT>::const_iterator const_iterator;
    const std::basic_string<charT>& search_text = test_info<charT>::search_text();
    boost::regex_constants::match_flag_type opts = test_info<charT>::match_options();
    const int* answer_table = test_info<charT>::answer_table();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk