Revert "Fix gcc-4.8 compilation warning when using -Wstrict-overflow"
This reverts commit 79109a8546
.
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
1 changed files with 2 additions and 2 deletions
|
@ -2451,7 +2451,7 @@ PUGI__NS_BEGIN
|
|||
|
||||
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');
|
||||
else if (ch == ';')
|
||||
break;
|
||||
|
@ -8047,7 +8047,7 @@ PUGI__NS_BEGIN
|
|||
{
|
||||
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';
|
||||
exponent--;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue