зеркало из https://github.com/mozilla/gecko-dev.git
Bug 755048 - Fix warnings for uninitiliazed variables and unhandled case. r=dbolter
This commit is contained in:
Родитель
7d88988978
Коммит
abbe143757
|
@ -47,7 +47,7 @@ StyleInfo::TextIndent(nsAString& aValue)
|
|||
const nsStyleCoord& styleCoord =
|
||||
mStyleContext->GetStyleText()->mTextIndent;
|
||||
|
||||
nscoord coordVal;
|
||||
nscoord coordVal = 0;
|
||||
switch (styleCoord.GetUnit()) {
|
||||
case eStyleUnit_Coord:
|
||||
coordVal = styleCoord.GetCoordValue();
|
||||
|
@ -62,6 +62,20 @@ StyleInfo::TextIndent(nsAString& aValue)
|
|||
styleCoord.GetPercentValue());
|
||||
break;
|
||||
}
|
||||
|
||||
case eStyleUnit_Null:
|
||||
case eStyleUnit_Normal:
|
||||
case eStyleUnit_Auto:
|
||||
case eStyleUnit_None:
|
||||
case eStyleUnit_Factor:
|
||||
case eStyleUnit_Degree:
|
||||
case eStyleUnit_Grad:
|
||||
case eStyleUnit_Radian:
|
||||
case eStyleUnit_Turn:
|
||||
case eStyleUnit_Integer:
|
||||
case eStyleUnit_Enumerated:
|
||||
case eStyleUnit_Calc:
|
||||
break;
|
||||
}
|
||||
|
||||
aValue.AppendFloat(nsPresContext::AppUnitsToFloatCSSPixels(coordVal));
|
||||
|
|
|
@ -707,6 +707,9 @@ TextAttrsMgr::TextPosTextAttr::
|
|||
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::textPosition,
|
||||
NS_LITERAL_STRING("super"));
|
||||
break;
|
||||
|
||||
case eTextPosNone:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -754,6 +757,19 @@ TextAttrsMgr::TextPosTextAttr::
|
|||
eTextPosSuper :
|
||||
(coordValue < 0 ? eTextPosSub : eTextPosBaseline);
|
||||
}
|
||||
|
||||
case eStyleUnit_Null:
|
||||
case eStyleUnit_Normal:
|
||||
case eStyleUnit_Auto:
|
||||
case eStyleUnit_None:
|
||||
case eStyleUnit_Factor:
|
||||
case eStyleUnit_Degree:
|
||||
case eStyleUnit_Grad:
|
||||
case eStyleUnit_Radian:
|
||||
case eStyleUnit_Turn:
|
||||
case eStyleUnit_Integer:
|
||||
case eStyleUnit_Calc:
|
||||
break;
|
||||
}
|
||||
|
||||
const nsIContent* content = aFrame->GetContent();
|
||||
|
|
|
@ -1401,7 +1401,8 @@ HTMLTableAccessible::IsProbablyLayoutTable()
|
|||
// Check for styled background color across rows (alternating background
|
||||
// color is a common feature for data tables).
|
||||
PRUint32 childCount = ChildCount();
|
||||
nscolor rowColor, prevRowColor;
|
||||
nscolor rowColor = 0;
|
||||
nscolor prevRowColor;
|
||||
for (PRUint32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
Accessible* child = GetChildAt(childIdx);
|
||||
if (child->Role() == roles::ROW) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче