diff --git a/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp index 08b5f527659..9e0fb0a9655 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp @@ -468,7 +468,7 @@ nsMathMLFrame::ParseNamedSpaceValue(nsIFrame* aMathMLmstyleFrame, // See if it is one of the 'namedspace' (ranging 1/18em...7/18em) PRInt32 i = 0; - nsIAtom* namedspaceAtom; + nsIAtom* namedspaceAtom = nsnull; if (aString.Equals(NS_LITERAL_STRING("veryverythinmathspace"))) { i = 1; namedspaceAtom = nsMathMLAtoms::veryverythinmathspace_; diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp index eb835400a93..09d34c6a17a 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp @@ -129,7 +129,7 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsIPresContext* aPresContext) { nsresult rv; nsAutoString value, data; - PRBool isMutable; + PRBool isMutable = PR_FALSE; ////////////// // see if the opening fence is there ... @@ -142,7 +142,7 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsIPresContext* aPresContext) else if (NS_CONTENT_ATTR_NOT_THERE == rv) data = PRUnichar('('); // default as per the MathML REC else - data = nsAutoString(); + data.Truncate(); if (0 < data.Length()) { mOpenChar = new nsMathMLChar; @@ -163,7 +163,7 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsIPresContext* aPresContext) else if (NS_CONTENT_ATTR_NOT_THERE == rv) data = PRUnichar(')'); // default as per the MathML REC else - data = nsAutoString(); + data.Truncate(); if (0 < data.Length()) { mCloseChar = new nsMathMLChar; @@ -184,16 +184,11 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsIPresContext* aPresContext) else if (NS_CONTENT_ATTR_NOT_THERE == rv) data = PRUnichar(','); // default as per the MathML REC else - data = nsAutoString(); + data.Truncate(); mSeparatorsCount = data.Length(); if (0 < mSeparatorsCount) { - PRInt32 sepCount = -1; - nsIFrame* childFrame = mFrames.FirstChild(); - while (childFrame) { - sepCount++; - childFrame->GetNextSibling(&childFrame); - } + PRInt32 sepCount = mFrames.GetLength() - 1; if (0 < sepCount) { mSeparatorsChar = new nsMathMLChar[sepCount]; if (!mSeparatorsChar) return NS_ERROR_OUT_OF_MEMORY; diff --git a/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp index 5a75ee12376..9e5adc7a616 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp @@ -294,7 +294,7 @@ nsMathMLmpaddedFrame::UpdateValue(nsIPresContext* aPresContext, nsCSSUnit unit = aCSSValue.GetUnit(); if (NS_MATHML_SIGN_INVALID != aSign && eCSSUnit_Null != unit) { - nscoord scaler, amount; + nscoord scaler = 0, amount = 0; if (eCSSUnit_Percent == unit || eCSSUnit_Number == unit) {