mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug 1224951 - Part 2: Fix -Wunreachable-code warnings in layout. r=dholbert
layout/base/nsCSSFrameConstructor.cpp:12067:12: warning: will never be executed [-Wunreachable-code] layout/base/nsPresContext.cpp:2861:10: warning: will never be executed [-Wunreachable-code] layout/generic/nsFrameSetFrame.cpp:730:11: warning: will never be executed [-Wunreachable-code] layout/generic/nsFrameSetFrame.cpp:725:11: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:268:62: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:269:66: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:270:68: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:271:75: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:272:73: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:273:81: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:274:69: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:275:60: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:276:68: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:277:68: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:279:18: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:290:62: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:291:66: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:292:68: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:293:75: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:294:73: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:295:81: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:296:69: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:297:60: warning: will never be executed [-Wunreachable-code] layout/generic/nsSelection.cpp:5657:7: warning: will never be executed [-Wunreachable-code] layout/mathml/nsMathMLmrootFrame.cpp:405:5: warning: will never be executed [-Wunreachable-code]
This commit is contained in:
parent
50912a55b9
commit
bfeb9f1127
@ -12062,8 +12062,8 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We might have some inline kids for this block. Just reconstruct.
|
// We might have some inline kids for this block. Just fall out of the
|
||||||
break;
|
// loop and reconstruct.
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
// If we don't have a containing block, start with aFrame and look for one.
|
// If we don't have a containing block, start with aFrame and look for one.
|
||||||
|
@ -722,12 +722,10 @@ nsFrameborder GetFrameBorderHelper(nsGenericHTMLElement* aContent)
|
|||||||
case NS_STYLE_FRAME_YES:
|
case NS_STYLE_FRAME_YES:
|
||||||
case NS_STYLE_FRAME_1:
|
case NS_STYLE_FRAME_1:
|
||||||
return eFrameborder_Yes;
|
return eFrameborder_Yes;
|
||||||
break;
|
|
||||||
|
|
||||||
case NS_STYLE_FRAME_NO:
|
case NS_STYLE_FRAME_NO:
|
||||||
case NS_STYLE_FRAME_0:
|
case NS_STYLE_FRAME_0:
|
||||||
return eFrameborder_No;
|
return eFrameborder_No;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,43 +265,41 @@ GetIndexFromSelectionType(SelectionType aType)
|
|||||||
{
|
{
|
||||||
switch (aType)
|
switch (aType)
|
||||||
{
|
{
|
||||||
case nsISelectionController::SELECTION_NORMAL: return 0; break;
|
case nsISelectionController::SELECTION_NORMAL: return 0;
|
||||||
case nsISelectionController::SELECTION_SPELLCHECK: return 1; break;
|
case nsISelectionController::SELECTION_SPELLCHECK: return 1;
|
||||||
case nsISelectionController::SELECTION_IME_RAWINPUT: return 2; break;
|
case nsISelectionController::SELECTION_IME_RAWINPUT: return 2;
|
||||||
case nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT: return 3; break;
|
case nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT: return 3;
|
||||||
case nsISelectionController::SELECTION_IME_CONVERTEDTEXT: return 4; break;
|
case nsISelectionController::SELECTION_IME_CONVERTEDTEXT: return 4;
|
||||||
case nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT: return 5; break;
|
case nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT: return 5;
|
||||||
case nsISelectionController::SELECTION_ACCESSIBILITY: return 6; break;
|
case nsISelectionController::SELECTION_ACCESSIBILITY: return 6;
|
||||||
case nsISelectionController::SELECTION_FIND: return 7; break;
|
case nsISelectionController::SELECTION_FIND: return 7;
|
||||||
case nsISelectionController::SELECTION_URLSECONDARY: return 8; break;
|
case nsISelectionController::SELECTION_URLSECONDARY: return 8;
|
||||||
case nsISelectionController::SELECTION_URLSTRIKEOUT: return 9; break;
|
case nsISelectionController::SELECTION_URLSTRIKEOUT: return 9;
|
||||||
default:
|
default:
|
||||||
return -1; break;
|
return -1;
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static SelectionType
|
static SelectionType
|
||||||
GetSelectionTypeFromIndex(int8_t aIndex)
|
GetSelectionTypeFromIndex(int8_t aIndex)
|
||||||
{
|
{
|
||||||
switch (aIndex)
|
switch (aIndex)
|
||||||
{
|
{
|
||||||
case 0: return nsISelectionController::SELECTION_NORMAL; break;
|
case 0: return nsISelectionController::SELECTION_NORMAL;
|
||||||
case 1: return nsISelectionController::SELECTION_SPELLCHECK; break;
|
case 1: return nsISelectionController::SELECTION_SPELLCHECK;
|
||||||
case 2: return nsISelectionController::SELECTION_IME_RAWINPUT; break;
|
case 2: return nsISelectionController::SELECTION_IME_RAWINPUT;
|
||||||
case 3: return nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT; break;
|
case 3: return nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT;
|
||||||
case 4: return nsISelectionController::SELECTION_IME_CONVERTEDTEXT; break;
|
case 4: return nsISelectionController::SELECTION_IME_CONVERTEDTEXT;
|
||||||
case 5: return nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT; break;
|
case 5: return nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT;
|
||||||
case 6: return nsISelectionController::SELECTION_ACCESSIBILITY; break;
|
case 6: return nsISelectionController::SELECTION_ACCESSIBILITY;
|
||||||
case 7: return nsISelectionController::SELECTION_FIND; break;
|
case 7: return nsISelectionController::SELECTION_FIND;
|
||||||
case 8: return nsISelectionController::SELECTION_URLSECONDARY; break;
|
case 8: return nsISelectionController::SELECTION_URLSECONDARY;
|
||||||
case 9: return nsISelectionController::SELECTION_URLSTRIKEOUT; break;
|
case 9: return nsISelectionController::SELECTION_URLSTRIKEOUT;
|
||||||
default:
|
default:
|
||||||
return nsISelectionController::SELECTION_NORMAL; break;
|
return nsISelectionController::SELECTION_NORMAL;
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -5669,7 +5667,6 @@ Selection::GetSelectionAnchorGeometry(SelectionRegion aRegion, nsRect* aRect)
|
|||||||
case nsISelectionController::SELECTION_ANCHOR_REGION:
|
case nsISelectionController::SELECTION_ANCHOR_REGION:
|
||||||
case nsISelectionController::SELECTION_FOCUS_REGION:
|
case nsISelectionController::SELECTION_FOCUS_REGION:
|
||||||
return GetSelectionEndPointGeometry(aRegion, aRect);
|
return GetSelectionEndPointGeometry(aRegion, aRect);
|
||||||
break;
|
|
||||||
case nsISelectionController::SELECTION_WHOLE_SELECTION:
|
case nsISelectionController::SELECTION_WHOLE_SELECTION:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -402,7 +402,6 @@ nsMathMLmrootFrame::GetAdditionalStyleContext(int32_t aIndex) const
|
|||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_SQR_CHAR_STYLE_CONTEXT_INDEX:
|
case NS_SQR_CHAR_STYLE_CONTEXT_INDEX:
|
||||||
return mSqrChar.GetStyleContext();
|
return mSqrChar.GetStyleContext();
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user