Fix some static analysis warnings
authorRuss Keldorph <diff.tool>
Sun, 30 Apr 2017 13:17:30 +0000 (06:17 -0700)
committerRuss Keldorph <russ.keldorph@microsoft.com>
Wed, 3 May 2017 21:20:19 +0000 (14:20 -0700)
commit1c7e1f4e0b9d338c209a8e73a00c8e9ab42b22e3
tree617f57dadfcc76346d6ff177cb7085dacfbaed3e
parente85c2b298e89147d71605c36d9109f87be2b3079
Fix some static analysis warnings

Most fixes are just addressing the use of (signed) enum-typed variables
as array indices.  Casting to unsigned allows us to cheaply include the
lower bound checks in the existing upper bound checks.  I would prefer
to force the underlying types of enumerations to be unsigned, but that
is a relatively new C++ feature and could have broader consequences than
I want to risk at this point.

The one other fix to asmparse.cpp just suppresses a warning that, while
technically valid, is not causing a real problem.  Perhaps this will get
better if/when #2305 is addressed.
src/ilasm/prebuilt/asmparse.cpp
src/jit/ee_il_dll.cpp
src/jit/flowgraph.cpp
src/jit/optimizer.cpp
src/vm/jitinterface.cpp
src/vm/methodtable.h