diff --git a/demo/regress/parse.cpp b/demo/regress/parse.cpp index 5ed56889..ae558e1f 100644 --- a/demo/regress/parse.cpp +++ b/demo/regress/parse.cpp @@ -311,7 +311,7 @@ void expand_escapes(string_type& s) s[pos] = 0; } else - s.insert(s.begin() + pos, val); + s.insert(s.begin() + pos, (char)val); i = pos; } else diff --git a/demo/regress/regress.cpp b/demo/regress/regress.cpp index 9d169277..5d13c7bd 100644 --- a/demo/regress/regress.cpp +++ b/demo/regress/regress.cpp @@ -237,7 +237,7 @@ void jm_debug_alloc::free_() } } -jm_debug_alloc::pointer jm_debug_alloc::allocate(size_type n, void* hint) +jm_debug_alloc::pointer jm_debug_alloc::allocate(size_type n, void*) { pointer p = new char[n + maxi(sizeof(size_type), boost::re_detail::padding_size)]; *(size_type*)p = n; diff --git a/demo/regress/tests.cpp b/demo/regress/tests.cpp index e61288a3..29bd7de8 100644 --- a/demo/regress/tests.cpp +++ b/demo/regress/tests.cpp @@ -490,13 +490,13 @@ bool hl_grep_test_proc(const RegEx& e) end = start + e.Length(-2); if(start == -1) { - if(matches[hl_match_id + 1] != search_text.size()) + if(matches[hl_match_id + 1] != (int)search_text.size()) { begin_error(); cout << "class RegEx grep error in $': found [" << start << "," << end << "] expected [" << matches[hl_match_id + 1] << "," << (search_text.size()) << "]" << endl; } } - else if((start != matches[hl_match_id + 1]) || (end != search_text.size())) + else if((start != matches[hl_match_id + 1]) || (end != (int)search_text.size())) { begin_error(); cout << "class RegEx grep error in $': found [" << start << "," << end << "] expected [" << matches[hl_match_id + 1] << "," << (search_text.size()) << "]" << endl; @@ -535,7 +535,7 @@ void cpp_hl_tests(RegEx& e, bool recurse = true) unsigned int j = 0; while(matches[j] != -2) { - if( (matches[j] != e.Position(i)) || (matches[j+1] - matches[j] != e.Length(i)) ) + if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) ) { begin_error(); cout << "RegEx::Search error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl; @@ -559,7 +559,7 @@ void cpp_hl_tests(RegEx& e, bool recurse = true) unsigned int j = 0; while(matches[j] != -2) { - if( (matches[j] != e.Position(i)) || (matches[j+1] - matches[j] != e.Length(i)) ) + if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) ) { begin_error(); cout << "RegEx::Match error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl; @@ -642,7 +642,7 @@ void run_tests() cpp_hl_tests(e, true); } } - catch(const std::exception& e) + catch(const std::exception& ) { if(search_text != BOOST_RE_STR("!")) { diff --git a/include/boost/re_detail/regex_synch.hpp b/include/boost/re_detail/regex_synch.hpp index e3b20262..f9c61124 100644 --- a/include/boost/re_detail/regex_synch.hpp +++ b/include/boost/re_detail/regex_synch.hpp @@ -107,6 +107,8 @@ public: private: lock_type& mut; bool owned; + // VC6 warning suppression: + lock_guard& operator=(const lock_guard&); };