Fix next round of warning types
authorJan Vorlicek <janvorli@microsoft.com>
Fri, 27 Mar 2015 22:30:10 +0000 (23:30 +0100)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 1 Apr 2015 19:39:28 +0000 (21:39 +0200)
commitde8b85b643ac08d69696ad078846424b69ae651f
tree3c8f416945ebb2768eeb1f26a5d09b5f4dcb2202
parent898cdcf05ae334252b354a1f5bae9e26be1912ec
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.
51 files changed:
CMakeLists.txt
src/ToolBox/SOS/Strike/stressLogDump.cpp
src/ToolBox/SOS/Strike/util.h
src/binder/applicationcontext.cpp
src/binder/assemblybinder.cpp
src/binder/textualidentityparser.cpp
src/binder/variables.cpp
src/classlibnative/bcltype/decimal.cpp
src/classlibnative/bcltype/number.cpp
src/debug/daccess/dacdbiimpl.cpp
src/debug/di/rsthread.cpp
src/debug/ee/debugger.cpp
src/debug/ee/debugger.h
src/debug/ee/funceval.cpp
src/debug/ee/rcthread.cpp
src/debug/inc/dacdbistructures.inl
src/dlls/mscoree/mscoree.cpp
src/gc/gc.cpp
src/inc/CMakeLists.txt
src/inc/arraylist.h
src/inc/ceefilegenwriter.h
src/inc/cortypeinfo.h
src/inc/gcinfoencoder.h
src/inc/internalunknownimpl.h
src/jit/assertionprop.cpp
src/jit/emitxarch.cpp
src/jit/flowgraph.cpp
src/jit/importer.cpp
src/jit/lsra.cpp
src/jit/morph.cpp
src/jit/utils.cpp
src/md/ceefilegen/blobfetcher.cpp
src/pal/inc/rt/palrt.h
src/palrt/decarith.cpp
src/palrt/decconv.cpp
src/utilcode/corimage.cpp
src/utilcode/ex.cpp
src/utilcode/rangetree.cpp
src/utilcode/util.cpp
src/vm/clsload.cpp
src/vm/codeman.cpp
src/vm/exceptionhandling.cpp
src/vm/frames.cpp
src/vm/gcenv.cpp
src/vm/hash.h
src/vm/interoputil.cpp
src/vm/jitinterface.cpp
src/vm/object.cpp
src/vm/securitymeta.cpp
src/vm/siginfo.cpp
src/vm/stackwalk.cpp