mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-28 23:03:00 +08:00
Revert "Fix gcc-4.8 compilation warning when using -Wstrict-overflow"
This reverts commit 79109a8546f963d17522d75112cffcfd8cbe35fc. This warning does not happen on gcc-4.8.4; the workaround introduces an unsigned integer overflow which results in a runtime error when compiled with integer sanitizer.
This commit is contained in:
parent
acfe47ba52
commit
956be4ca4b
@ -2451,7 +2451,7 @@ PUGI__NS_BEGIN
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (static_cast<unsigned int>(static_cast<unsigned int>(ch) - '0') <= 9)
|
if (static_cast<unsigned int>(ch - '0') <= 9)
|
||||||
ucsc = 10 * ucsc + (ch - '0');
|
ucsc = 10 * ucsc + (ch - '0');
|
||||||
else if (ch == ';')
|
else if (ch == ';')
|
||||||
break;
|
break;
|
||||||
@ -8047,7 +8047,7 @@ PUGI__NS_BEGIN
|
|||||||
{
|
{
|
||||||
while (exponent > 0)
|
while (exponent > 0)
|
||||||
{
|
{
|
||||||
assert(*mantissa == 0 || static_cast<unsigned int>(static_cast<unsigned int>(*mantissa) - '0') <= 9);
|
assert(*mantissa == 0 || static_cast<unsigned int>(*mantissa - '0') <= 9);
|
||||||
*s++ = *mantissa ? *mantissa++ : '0';
|
*s++ = *mantissa ? *mantissa++ : '0';
|
||||||
exponent--;
|
exponent--;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user