mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-31 00:13:01 +08:00
Fix gcc-4.8 compilation warning when using -Wstrict-overflow
git-svn-id: http://pugixml.googlecode.com/svn/trunk@956 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
48600c3a9d
commit
79109a8546
@ -1681,7 +1681,7 @@ PUGI__NS_BEGIN
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (static_cast<unsigned int>(ch - '0') <= 9)
|
||||
if (static_cast<unsigned int>(static_cast<unsigned int>(ch) - '0') <= 9)
|
||||
ucsc = 10 * ucsc + (ch - '0');
|
||||
else if (ch == ';')
|
||||
break;
|
||||
@ -6436,7 +6436,7 @@ PUGI__NS_BEGIN
|
||||
{
|
||||
while (exponent > 0)
|
||||
{
|
||||
assert(*mantissa == 0 || static_cast<unsigned int>(*mantissa - '0') <= 9);
|
||||
assert(*mantissa == 0 || static_cast<unsigned int>(static_cast<unsigned int>(*mantissa) - '0') <= 9);
|
||||
*s++ = *mantissa ? *mantissa++ : '0';
|
||||
exponent--;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user