diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp
index 646d3267e535..780cd75ee191 100644
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -1599,6 +1599,7 @@ static PRBool BlinkIsAllowed(void)
return sBlinkIsAllowed;
}
+#ifdef FONT_LEADING_APIS_V2
static eNormalLineHeightControl GetNormalLineHeightCalcControl(void)
{
if (sNormalLineHeightControl == eUninitialized) {
@@ -1614,6 +1615,7 @@ static eNormalLineHeightControl GetNormalLineHeightCalcControl(void)
}
return sNormalLineHeightControl;
}
+#endif
// Reset mFlags.mTableDerivedComputedWidth if there is a non percent style width
// or if there is a percent style width and the parent has a style width.
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 75a4a9606758..ef830b6399c2 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -2282,7 +2282,9 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
nsBidiPresUtils* bidiUtils;
aPresContext->GetBidiUtils(&bidiUtils);
if (bidiUtils) {
+#ifdef DEBUG
PRInt32 rememberTextLength = textLength;
+#endif
bidiUtils->ReorderUnicodeText(text, textLength,
charType, level & 1, isBidiSystem);
NS_ASSERTION(rememberTextLength == textLength, "Bidi formatting changed text length");
@@ -2970,7 +2972,9 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
(void**) &level,sizeof(level));
GetBidiProperty(aPresContext, nsLayoutAtoms::charType,
(void**) &charType,sizeof(charType));
+#ifdef DEBUG
PRInt32 rememberTextLength = textLength;
+#endif
// Since we paint char by char, handle the text like on non-bidi platform
bidiUtils->ReorderUnicodeText(text, textLength, charType,
level & 1, PR_FALSE);
diff --git a/layout/html/base/src/nsHTMLReflowState.cpp b/layout/html/base/src/nsHTMLReflowState.cpp
index 646d3267e535..780cd75ee191 100644
--- a/layout/html/base/src/nsHTMLReflowState.cpp
+++ b/layout/html/base/src/nsHTMLReflowState.cpp
@@ -1599,6 +1599,7 @@ static PRBool BlinkIsAllowed(void)
return sBlinkIsAllowed;
}
+#ifdef FONT_LEADING_APIS_V2
static eNormalLineHeightControl GetNormalLineHeightCalcControl(void)
{
if (sNormalLineHeightControl == eUninitialized) {
@@ -1614,6 +1615,7 @@ static eNormalLineHeightControl GetNormalLineHeightCalcControl(void)
}
return sNormalLineHeightControl;
}
+#endif
// Reset mFlags.mTableDerivedComputedWidth if there is a non percent style width
// or if there is a percent style width and the parent has a style width.
diff --git a/layout/html/base/src/nsTextFrame.cpp b/layout/html/base/src/nsTextFrame.cpp
index 75a4a9606758..ef830b6399c2 100644
--- a/layout/html/base/src/nsTextFrame.cpp
+++ b/layout/html/base/src/nsTextFrame.cpp
@@ -2282,7 +2282,9 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
nsBidiPresUtils* bidiUtils;
aPresContext->GetBidiUtils(&bidiUtils);
if (bidiUtils) {
+#ifdef DEBUG
PRInt32 rememberTextLength = textLength;
+#endif
bidiUtils->ReorderUnicodeText(text, textLength,
charType, level & 1, isBidiSystem);
NS_ASSERTION(rememberTextLength == textLength, "Bidi formatting changed text length");
@@ -2970,7 +2972,9 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
(void**) &level,sizeof(level));
GetBidiProperty(aPresContext, nsLayoutAtoms::charType,
(void**) &charType,sizeof(charType));
+#ifdef DEBUG
PRInt32 rememberTextLength = textLength;
+#endif
// Since we paint char by char, handle the text like on non-bidi platform
bidiUtils->ReorderUnicodeText(text, textLength, charType,
level & 1, PR_FALSE);
diff --git a/layout/xul/base/src/nsBoxObject.cpp b/layout/xul/base/src/nsBoxObject.cpp
index b4d9686684cd..1cd498da2529 100644
--- a/layout/xul/base/src/nsBoxObject.cpp
+++ b/layout/xul/base/src/nsBoxObject.cpp
@@ -289,7 +289,7 @@ nsBoxObject::GetScreenRect(nsRect& aRect)
if (presContext) {
nsIFrame* frame;
- nsresult rv = presShell->GetPrimaryFrameFor(mContent, &frame);
+ presShell->GetPrimaryFrameFor(mContent, &frame);
PRInt32 offsetX = 0;
PRInt32 offsetY = 0;
diff --git a/layout/xul/base/src/nsXULTooltipListener.cpp b/layout/xul/base/src/nsXULTooltipListener.cpp
index 521a87c91bd7..643d0a4ea173 100644
--- a/layout/xul/base/src/nsXULTooltipListener.cpp
+++ b/layout/xul/base/src/nsXULTooltipListener.cpp
@@ -437,6 +437,7 @@ nsXULTooltipListener::ShowTooltip()
}
#ifdef MOZ_XUL
+#ifdef DEBUG_crap
static void
GetTreeCellCoords(nsITreeBoxObject* aTreeBox, nsIContent* aSourceNode,
PRInt32 aRow, nsAutoString aCol, PRInt32* aX, PRInt32* aY)
@@ -453,6 +454,7 @@ GetTreeCellCoords(nsITreeBoxObject* aTreeBox, nsIContent* aSourceNode,
*aX += myX;
*aY += myY;
}
+#endif
static void
SetTitletipLabel(nsITreeBoxObject* aTreeBox, nsIContent* aTooltip,