added braces to suppress g++ 4.3 warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -269,10 +269,12 @@ size_t TestInputStream::OnSysRead(void *buffer, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (((m_eoftype & AtLast) != 0 && m_pos >= m_size) || count < size)
|
if (((m_eoftype & AtLast) != 0 && m_pos >= m_size) || count < size)
|
||||||
|
{
|
||||||
if ((m_eoftype & WithError) != 0)
|
if ((m_eoftype & WithError) != 0)
|
||||||
m_lasterror = wxSTREAM_READ_ERROR;
|
m_lasterror = wxSTREAM_READ_ERROR;
|
||||||
else
|
else
|
||||||
m_lasterror = wxSTREAM_EOF;
|
m_lasterror = wxSTREAM_EOF;
|
||||||
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@@ -272,19 +272,23 @@ void RegExTestCase::doTest(int flavor)
|
|||||||
|
|
||||||
// m - check the match returns the strings given
|
// m - check the match returns the strings given
|
||||||
if (m_mode == 'm')
|
if (m_mode == 'm')
|
||||||
|
{
|
||||||
if (start < INT_MAX)
|
if (start < INT_MAX)
|
||||||
result = m_data.substr(start, len);
|
result = m_data.substr(start, len);
|
||||||
else
|
else
|
||||||
result = _T("");
|
result = _T("");
|
||||||
|
}
|
||||||
|
|
||||||
// i - check the match returns the offsets given
|
// i - check the match returns the offsets given
|
||||||
else if (m_mode == 'i')
|
else if (m_mode == 'i')
|
||||||
|
{
|
||||||
if (start > INT_MAX)
|
if (start > INT_MAX)
|
||||||
result = _T("-1 -1");
|
result = _T("-1 -1");
|
||||||
else if (start + len > 0)
|
else if (start + len > 0)
|
||||||
result << start << _T(" ") << start + len - 1;
|
result << start << _T(" ") << start + len - 1;
|
||||||
else
|
else
|
||||||
result << start << _T(" -1");
|
result << start << _T(" -1");
|
||||||
|
}
|
||||||
|
|
||||||
msg.clear();
|
msg.clear();
|
||||||
msg << _T("match(") << i << _T(") == ") << quote(result)
|
msg << _T("match(") << i << _T(") == ") << quote(result)
|
||||||
|
Reference in New Issue
Block a user