diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-03-27 23:30:10 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-04-01 21:39:28 +0200 |
commit | de8b85b643ac08d69696ad078846424b69ae651f (patch) | |
tree | 3c8f416945ebb2768eeb1f26a5d09b5f4dcb2202 /src/palrt | |
parent | 898cdcf05ae334252b354a1f5bae9e26be1912ec (diff) | |
download | coreclr-de8b85b643ac08d69696ad078846424b69ae651f.tar.gz coreclr-de8b85b643ac08d69696ad078846424b69ae651f.tar.bz2 coreclr-de8b85b643ac08d69696ad078846424b69ae651f.zip |
Fix next round of warning types
This change fixes the following warnings:
1) Assignment in a condition should be wrapped in ()
2) Priority of && / || should be indicated by parentheses.
3) Unknown #pragma optimize ifdefed out for non MSVC
4) Unused functions deleted or put under #ifdef
5) Extra tokens warning disabling moved to the CMakeLists.txt in the src/inc
6) Self assignment of a member or local variable
7) Assigning ~0 to a bitfield member that was just 8 bit wide
It also fixes a bug in the STRESS_LOGxx macro invocation in exceptionhandling.cpp and
stackwalk.cpp related to recent adding the DBG_ADDR macro usage. This macro expanded
a single parameter into two expressions to extract high / low 32 bits separately.
But the STRESS_LOGxx parameters are passed to the StressLog::LogMsg method as follows:
(void*)(size_t)(data1)
That means that the expanded pair x, y would be inserted as data 1 and that leads
to ignoring the x due to the comma operator.
Diffstat (limited to 'src/palrt')
-rw-r--r-- | src/palrt/decarith.cpp | 8 | ||||
-rw-r--r-- | src/palrt/decconv.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/palrt/decarith.cpp b/src/palrt/decarith.cpp index 03b206924d..1552dbd740 100644 --- a/src/palrt/decarith.cpp +++ b/src/palrt/decarith.cpp @@ -1001,10 +1001,10 @@ HaveScale64: rgulRem[1] = (rgulRem[1] << 1) + ulTmp; rgulRem[2] = (rgulRem[2] << 1) + ulTmp1; - if (rgulRem[2] > rgulDivisor[2] || rgulRem[2] == rgulDivisor[2] && - (rgulRem[1] > rgulDivisor[1] || rgulRem[1] == rgulDivisor[1] && - (rgulRem[0] > rgulDivisor[0] || rgulRem[0] == rgulDivisor[0] && - (rgulQuo[0] & 1)))) + if (rgulRem[2] > rgulDivisor[2] || (rgulRem[2] == rgulDivisor[2] && + (rgulRem[1] > rgulDivisor[1] || (rgulRem[1] == rgulDivisor[1] && + (rgulRem[0] > rgulDivisor[0] || (rgulRem[0] == rgulDivisor[0] && + (rgulQuo[0] & 1))))))) goto RoundUp; break; } diff --git a/src/palrt/decconv.cpp b/src/palrt/decconv.cpp index 259f72e9c8..2ba6703904 100644 --- a/src/palrt/decconv.cpp +++ b/src/palrt/decconv.cpp @@ -186,7 +186,7 @@ VarDecFromR4(float fltIn, DECIMAL FAR* pdecOut) // ulMant = (LONG)dbl; dbl -= (double)ulMant; // difference between input & integer - if ( dbl > 0.5 || dbl == 0.5 && (ulMant & 1) ) + if ( dbl > 0.5 || (dbl == 0.5 && (ulMant & 1)) ) ulMant++; if (ulMant == 0) @@ -333,7 +333,7 @@ VarDecFromR8(double dblIn, DECIMAL FAR* pdecOut) // sdlMant.int64 = (LONGLONG)dbl; dbl -= (double)(LONGLONG)sdlMant.int64; // dif between input & integer - if ( dbl > 0.5 || dbl == 0.5 && (sdlMant.u.Lo & 1) ) + if ( dbl > 0.5 || (dbl == 0.5 && (sdlMant.u.Lo & 1)) ) sdlMant.int64++; if (sdlMant.int64 == 0) @@ -529,7 +529,7 @@ STDAPI VarCyFromDec(DECIMAL FAR* pdecIn, CY FAR* pcyOut) // Round result based on remainder in sdlTmp1.Hi. // ulPwr >>= 1; // compare to power/2 (power always even) - if (sdlTmp1.u.Hi > ulPwr || sdlTmp1.u.Hi == ulPwr && (sdlTmp.u.Lo & 1)) + if (sdlTmp1.u.Hi > ulPwr || (sdlTmp1.u.Hi == ulPwr && (sdlTmp.u.Lo & 1))) sdlTmp.int64++; } else { @@ -584,8 +584,8 @@ STDAPI VarCyFromDec(DECIMAL FAR* pdecIn, CY FAR* pcyOut) // Current result is in sdlTmp. // ulPwr >>= 1; // compare to power/2 (power always even) - if (sdlTmp1.u.Lo > ulPwr || sdlTmp1.u.Lo == ulPwr && - ((sdlTmp.u.Lo & 1) || sdlTmp1.u.Hi != 0)) + if (sdlTmp1.u.Lo > ulPwr || (sdlTmp1.u.Lo == ulPwr && + ((sdlTmp.u.Lo & 1) || sdlTmp1.u.Hi != 0))) sdlTmp.int64++; } |