mirror of
https://github.com/boostorg/regex.git
synced 2025-07-13 20:36:39 +02:00
regex: some fixes for level 4 warnings under VC6
[SVN r8942]
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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("!"))
|
||||
{
|
||||
|
@ -107,6 +107,8 @@ public:
|
||||
private:
|
||||
lock_type& mut;
|
||||
bool owned;
|
||||
// VC6 warning suppression:
|
||||
lock_guard& operator=(const lock_guard&);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user