Bug 1240263 - Annotate intentional switch fallthroughs in dom/xslt/. r=peterv

dom/xslt/xpath/txCoreFunctionCall.cpp:214:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/xslt/xpath/txLocationStep.cpp:47:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/xslt/xpath/txLocationStep.cpp:79:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/xslt/xpath/txXPCOMExtensionFunction.cpp:290:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/xslt/xslt/txOutputFormat.cpp:86:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
This commit is contained in:
Chris Peterson 2016-01-14 01:41:43 -08:00
parent 36f27c0871
commit a2d006635b
4 changed files with 6 additions and 5 deletions

View File

@ -207,9 +207,10 @@ txCoreFunctionCall::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
}
default:
{
break;
MOZ_CRASH("Unexpected mType?!");
}
}
MOZ_CRASH("Inner mType switch should have returned!");
}
case POSITION:
{

View File

@ -42,7 +42,7 @@ LocationStep::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
if (!walker.moveToParent()) {
break;
}
// do not break here
MOZ_FALLTHROUGH;
}
case ANCESTOR_OR_SELF_AXIS:
{
@ -74,7 +74,7 @@ LocationStep::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
if (mNodeTest->matches(walker.getCurrentPosition(), aContext)) {
nodes->append(walker.getCurrentPosition());
}
// do not break here
MOZ_FALLTHROUGH;
}
case DESCENDANT_AXIS:
{

View File

@ -285,8 +285,8 @@ txXPCOMExtensionFunctionCall::GetParamType(const nsXPTParamInfo &aParam,
if (iid.Equals(NS_GET_IID(txIXPathObject))) {
return eOBJECT;
}
return eUNKNOWN;
}
// FALLTHROUGH
default:
{
// XXX Error!

View File

@ -81,7 +81,7 @@ void txOutputFormat::setFromDefaults()
case eMethodNotSet:
{
mMethod = eXMLOutput;
// Fall through
MOZ_FALLTHROUGH;
}
case eXMLOutput:
{