summaryrefslogtreecommitdiff
path: root/src/jit/assertionprop.cpp
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2015-04-20 16:36:14 -0700
committerBrian Sullivan <briansul@microsoft.com>2015-04-28 11:12:20 -0700
commit8201dd51434fa803a3d32e6bafb3175f18fb2329 (patch)
tree3b76672d3118570ddbed934b733681876428ec2c /src/jit/assertionprop.cpp
parent0fe17e9cfe627abfd860ff53772768608da3a08d (diff)
downloadcoreclr-8201dd51434fa803a3d32e6bafb3175f18fb2329.tar.gz
coreclr-8201dd51434fa803a3d32e6bafb3175f18fb2329.tar.bz2
coreclr-8201dd51434fa803a3d32e6bafb3175f18fb2329.zip
Removed the -Wno-switch compiler option for the Clang builds on Linux
Fix all these warnings in the JIT that were disabled by the -Wno-switch option Fix the two new warnings in Strike/strike.cpp
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r--src/jit/assertionprop.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp
index 409fc64542..fccec98089 100644
--- a/src/jit/assertionprop.cpp
+++ b/src/jit/assertionprop.cpp
@@ -1449,6 +1449,10 @@ void Compiler::optDebugCheckAssertions(unsigned index)
}
}
break;
+
+ default:
+ // for all other 'assertion->op2.kind' values we don't check anything
+ break;
}
}
}
@@ -1743,7 +1747,7 @@ void Compiler::optAssertionGen(GenTreePtr tree)
// For most of the assertions that we create below
// the assertion is true after the tree is processed
bool assertionProven = true;
- unsigned assertionIndex = 0;
+ unsigned assertionIndex = NO_ASSERTION_INDEX;
switch (tree->gtOper)
{
case GT_ASG:
@@ -1814,6 +1818,10 @@ void Compiler::optAssertionGen(GenTreePtr tree)
case GT_JTRUE:
assertionIndex = optAssertionGenJtrue(tree);
break;
+
+ default:
+ // All other gtOper node kinds, leave 'assertionIndex' = NO_ASSERTION_INDEX
+ break;
}
// For global assertion prop we must store the assertion number in the tree node
@@ -3771,6 +3779,10 @@ EXPSET_TP Compiler::optImpliedByConstAssertion(AssertionDsc* constAssertion)
usable = ((impAssertion->assertionKind == OAK_EQUAL) && (impAssertion->op2.u1.iconVal == iconVal)) ||
((impAssertion->assertionKind == OAK_NOT_EQUAL) && (impAssertion->op2.u1.iconVal != iconVal));
break;
+
+ default:
+ // leave 'usable' = false;
+ break;
}
if (usable)
@@ -3932,6 +3944,10 @@ EXPSET_TP Compiler::optImpliedByCopyAssertion(AssertionDsc* copyAssertion, Asser
(depAssertLclNum == impAssertion->op1.lcl.lclNum && depAssertSsaNum == impAssertion->op1.lcl.ssaNum));
}
break;
+
+ default:
+ // leave 'usable' = false;
+ break;
}
if (usable)