From de8b85b643ac08d69696ad078846424b69ae651f Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 27 Mar 2015 23:30:10 +0100 Subject: 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. --- src/vm/stackwalk.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/vm/stackwalk.cpp') diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index e78b1eb71f..d39ce06ef4 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -1972,8 +1972,8 @@ ProcessFuncletsForGCReporting: _ASSERTE(m_flags & GC_FUNCLET_REFERENCE_REPORTING); STRESS_LOG2(LF_GCROOTS, LL_INFO100, - "STACKWALK: Reached parent of non-filter funclet @ CallerSP: " FMT_ADDR ", m_crawl.pFunc = " FMT_ADDR "\n", - DBG_ADDR(m_sfParent.SP), DBG_ADDR(m_crawl.pFunc)); + "STACKWALK: Reached parent of non-filter funclet @ CallerSP: %p, m_crawl.pFunc = %p\n", + m_sfParent.SP, m_crawl.pFunc); // by default a funclet's parent won't report its GC roots since they would have already // been reported by the funclet. however there is a small window during unwind before @@ -2008,8 +2008,8 @@ ProcessFuncletsForGCReporting: } STRESS_LOG4(LF_GCROOTS, LL_INFO100, - "Funclet didn't report references: handling frame: " FMT_ADDR ", m_sfFuncletParent = " FMT_ADDR ", is funclet: %d, skip reporting %d\n", - DBG_ADDR(pTracker->GetEstablisherOfActualHandlingFrame().SP), DBG_ADDR(m_sfFuncletParent.SP), m_crawl.IsFunclet(), shouldSkipReporting); + "Funclet didn't report references: handling frame: %p, m_sfFuncletParent = %p, is funclet: %d, skip reporting %d\n", + pTracker->GetEstablisherOfActualHandlingFrame().SP, m_sfFuncletParent.SP, m_crawl.IsFunclet(), shouldSkipReporting); } m_crawl.fShouldParentToFuncletSkipReportingGCReferences = shouldSkipReporting; -- cgit v1.2.3