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/debug | |
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/debug')
-rw-r--r-- | src/debug/daccess/dacdbiimpl.cpp | 2 | ||||
-rw-r--r-- | src/debug/di/rsthread.cpp | 2 | ||||
-rw-r--r-- | src/debug/ee/debugger.cpp | 2 | ||||
-rw-r--r-- | src/debug/ee/debugger.h | 4 | ||||
-rw-r--r-- | src/debug/ee/funceval.cpp | 2 | ||||
-rw-r--r-- | src/debug/ee/rcthread.cpp | 2 | ||||
-rw-r--r-- | src/debug/inc/dacdbistructures.inl | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp index aed15c0434..8151f79834 100644 --- a/src/debug/daccess/dacdbiimpl.cpp +++ b/src/debug/daccess/dacdbiimpl.cpp @@ -1887,7 +1887,7 @@ TypeHandle DacDbiInterfaceImpl::TypeDataWalk::ReadLoadedTypeArg(TypeHandleReadTy return ReadLoadedTypeHandle(kGetExact); #else - if ((retrieveWhich == kGetExact)) + if (retrieveWhich == kGetExact) return ReadLoadedTypeHandle(kGetExact); // This nasty bit of code works out what the "canonicalization" of a diff --git a/src/debug/di/rsthread.cpp b/src/debug/di/rsthread.cpp index 82103699cf..601d21f384 100644 --- a/src/debug/di/rsthread.cpp +++ b/src/debug/di/rsthread.cpp @@ -8915,7 +8915,7 @@ HRESULT CordbJITILFrame::GetReturnValueForILOffsetImpl(ULONG32 ILoffset, ICorDeb bool found = false; ULONG32 currentOffset = m_nativeFrame->GetIPOffset(); for (ULONG32 i = 0; i < count; ++i) - if (found = currentOffset == offsets[i]) + if ((found = currentOffset == offsets[i])) break; if (!found) diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp index 582a3954a9..11460ecefd 100644 --- a/src/debug/ee/debugger.cpp +++ b/src/debug/ee/debugger.cpp @@ -8146,7 +8146,7 @@ void Debugger::SendCatchHandlerFound( LOG((LF_CORDB, LL_INFO10000, "D::FirstChanceManagedExceptionCatcherFound\n")); - if ((pThread == NULL)) + if (pThread == NULL) { _ASSERTE(!"Bad parameter"); LOG((LF_CORDB, LL_INFO10000, "D::FirstChanceManagedExceptionCatcherFound - Bad parameter.\n")); diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h index 25c1ad5dd6..96103844a9 100644 --- a/src/debug/ee/debugger.h +++ b/src/debug/ee/debugger.h @@ -225,7 +225,7 @@ private: startInCoop = bStartInCoop; conditional = bConditional; - if (!conditional || IFTHREAD && g_pEEInterface->GetThread() == NULL) + if (!conditional || (IFTHREAD && g_pEEInterface->GetThread() == NULL)) { return; } @@ -245,7 +245,7 @@ private: void LeaveInternal() { - if (!conditional || IFTHREAD && g_pEEInterface->GetThread() == NULL) + if (!conditional || (IFTHREAD && g_pEEInterface->GetThread() == NULL)) { return; } diff --git a/src/debug/ee/funceval.cpp b/src/debug/ee/funceval.cpp index 93f5dcdc60..a15e6ad7ff 100644 --- a/src/debug/ee/funceval.cpp +++ b/src/debug/ee/funceval.cpp @@ -1805,7 +1805,7 @@ void GatherFuncEvalArgInfo(DebuggerEval *pDE, // the sig says value class, but we've got a boxed value class, then remember that we need to unbox it. // bool fNeedBoxOrUnbox = ((argSigType == ELEMENT_TYPE_CLASS) && (pFEAD->argElementType == ELEMENT_TYPE_VALUETYPE)) || - ((argSigType == ELEMENT_TYPE_VALUETYPE) && ((pFEAD->argElementType == ELEMENT_TYPE_CLASS) || (pFEAD->argElementType == ELEMENT_TYPE_OBJECT)) || + (((argSigType == ELEMENT_TYPE_VALUETYPE) && ((pFEAD->argElementType == ELEMENT_TYPE_CLASS) || (pFEAD->argElementType == ELEMENT_TYPE_OBJECT))) || // This is when method signature is expecting a BYREF ValueType, yet we recieve the boxed valuetype's handle. (pFEAD->argElementType == ELEMENT_TYPE_CLASS && argSigType == ELEMENT_TYPE_BYREF && byrefArgSigType == ELEMENT_TYPE_VALUETYPE)); diff --git a/src/debug/ee/rcthread.cpp b/src/debug/ee/rcthread.cpp index 896db99884..cf19d6fbec 100644 --- a/src/debug/ee/rcthread.cpp +++ b/src/debug/ee/rcthread.cpp @@ -809,7 +809,7 @@ static LONG _debugFilter(LPEXCEPTION_POINTERS ep, PVOID pv) DWORD tid = GetCurrentThreadId(); DebuggerIPCEventType type = (DebuggerIPCEventType) (event->type & DB_IPCE_TYPE_MASK); -#endif _DEBUG || !FEATURE_CORESYSTEM +#endif // _DEBUG || !FEATURE_CORESYSTEM // We should never AV here. In a debug build, throw up an assert w/ lots of useful (private) info. #ifdef _DEBUG diff --git a/src/debug/inc/dacdbistructures.inl b/src/debug/inc/dacdbistructures.inl index 0471426ef7..fe591c8735 100644 --- a/src/debug/inc/dacdbistructures.inl +++ b/src/debug/inc/dacdbistructures.inl @@ -343,7 +343,7 @@ DWORD SequencePoints::MapNativeOffsetToIL(DWORD dwNativeOffset, // If the end offset is 0, we want to check if we're in the prologue before concluding that the // value of dwNativeOffset is out of range. if ((dwNativeOffset >= m_map[i].nativeStartOffset) && - ((m_map[i].nativeEndOffset == 0) && (m_map[i].ilOffset != (ULONG)ICorDebugInfo::PROLOG) || + (((m_map[i].nativeEndOffset == 0) && (m_map[i].ilOffset != (ULONG)ICorDebugInfo::PROLOG)) || (dwNativeOffset < m_map[i].nativeEndOffset))) { ULONG uILOffset = m_map[i].ilOffset; |