Bug 452797 - Clean up unused variables in layout/; v6; r+sr=roc
authorArpad Borsos <arpad.borsos@googlemail.com>
Sat, 20 Sep 2008 15:42:03 +0200
changeset 19448 53ef3c05e895d5f57ca23f4e9f05a5fe61b44606
parent 19447 b4d91cd61404f2e592bc0a3cf51046328e7aa4df
child 19449 f0f5edda263308b2bf86a1bafbfe8da297edd35b
push id2237
push usersgautherie.bz@free.fr
push dateSat, 20 Sep 2008 13:43:35 +0000
treeherdermozilla-central@53ef3c05e895 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs452797
milestone1.9.1b1pre
Bug 452797 - Clean up unused variables in layout/; v6; r+sr=roc
layout/base/nsImageLoader.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
layout/base/nsPresShell.cpp
layout/forms/nsListControlFrame.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsContainerFrame.cpp
layout/generic/nsObjectFrame.cpp
layout/style/nsCSSDataBlock.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsRuleNode.cpp
layout/svg/base/src/nsSVGOuterSVGFrame.cpp
layout/xul/base/src/nsBox.cpp
layout/xul/base/src/nsXULPopupManager.cpp
layout/xul/base/src/nsXULTooltipListener.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
--- a/layout/base/nsImageLoader.cpp
+++ b/layout/base/nsImageLoader.cpp
@@ -207,17 +207,20 @@ NS_IMETHODIMP nsImageLoader::FrameChange
 }
 
 
 void
 nsImageLoader::RedrawDirtyFrame(const nsRect* aDamageRect)
 {
   if (mReflowOnLoad) {
     nsIPresShell *shell = mPresContext->GetPresShell();
-    nsresult rv = shell->FrameNeedsReflow(mFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
+#ifdef DEBUG
+    nsresult rv = 
+#endif
+      shell->FrameNeedsReflow(mFrame, nsIPresShell::eStyleChange, NS_FRAME_IS_DIRTY);
     NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Could not reflow after loading border-image");
     // The reflow might not do all the invalidation we need, so continue
     // on with the invalidation codepath.
   }
   // NOTE: It is not sufficient to invalidate only the size of the image:
   //       the image may be tiled! 
   //       The best option is to call into the frame, however lacking this
   //       we have to at least invalidate the frame's bounds, hence
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -85,19 +85,17 @@
 #include "nsSVGForeignObjectFrame.h"
 #include "nsSVGOuterSVGFrame.h"
 #endif
 
 /**
  * A namespace class for static layout utilities.
  */
 
-#ifdef DEBUG
 PRBool nsLayoutUtils::sDisableGetUsedXAssertions = PR_FALSE;
-#endif
 
 nsIFrame*
 nsLayoutUtils::GetLastContinuationWithChild(nsIFrame* aFrame)
 {
   NS_PRECONDITION(aFrame, "NULL frame pointer");
   aFrame = aFrame->GetLastContinuation();
   while (!aFrame->GetFirstChild(nsnull) &&
          aFrame->GetPrevContinuation()) {
@@ -2018,17 +2016,16 @@ nsLayoutUtils::IntrinsicForContainer(nsI
 /* static */ nscoord
 nsLayoutUtils::ComputeWidthDependentValue(
                  nscoord              aContainingBlockWidth,
                  const nsStyleCoord&  aCoord)
 {
   NS_PRECONDITION(aContainingBlockWidth != NS_UNCONSTRAINEDSIZE,
                   "unconstrained widths no longer supported");
 
-  nscoord result;
   if (eStyleUnit_Coord == aCoord.GetUnit()) {
     return aCoord.GetCoordValue();
   }
   if (eStyleUnit_Percent == aCoord.GetUnit()) {
     return NSToCoordFloor(aContainingBlockWidth * aCoord.GetPercentValue());
   }
   NS_ASSERTION(aCoord.GetUnit() == eStyleUnit_None ||
                aCoord.GetUnit() == eStyleUnit_Auto,
@@ -2096,17 +2093,16 @@ nsLayoutUtils::ComputeWidthValue(
 }
 
 
 /* static */ nscoord
 nsLayoutUtils::ComputeHeightDependentValue(
                  nscoord              aContainingBlockHeight,
                  const nsStyleCoord&  aCoord)
 {
-  nscoord result;
   if (eStyleUnit_Coord == aCoord.GetUnit()) {
     return aCoord.GetCoordValue();
   }
   if (eStyleUnit_Percent == aCoord.GetUnit()) {
     // XXXldb Some callers explicitly check aContainingBlockHeight
     // against NS_AUTOHEIGHT *and* unit against eStyleUnit_Percent
     // before calling this function, so this assertion probably needs to
     // be inside the percentage case.  However, it would be much more
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -861,38 +861,34 @@ public:
    */
   static nsIDeviceContext*
   GetDeviceContextForScreenInfo(nsIDocShell* aDocShell);
 
   /**
    * Indicates if the nsIFrame::GetUsedXXX assertions in nsFrame.cpp should
    * disabled.
    */
-#ifdef DEBUG
   static PRBool sDisableGetUsedXAssertions;
-#endif
 };
 
 class nsAutoDisableGetUsedXAssertions
 {
-#ifdef DEBUG
 public:
   nsAutoDisableGetUsedXAssertions()
     : mOldValue(nsLayoutUtils::sDisableGetUsedXAssertions)
   {
     nsLayoutUtils::sDisableGetUsedXAssertions = PR_TRUE;
   }
   ~nsAutoDisableGetUsedXAssertions()
   {
     nsLayoutUtils::sDisableGetUsedXAssertions = mOldValue;
   }
 
 private:
   PRBool mOldValue;
-#endif  
 };
 
 class nsSetAttrRunnable : public nsRunnable
 {
 public:
   nsSetAttrRunnable(nsIContent* aContent, nsIAtom* aAttrName,
                     const nsAString& aValue);
 
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -2695,18 +2695,17 @@ void PresShell::SetCaret(nsCaret *aNewCa
 
 void PresShell::RestoreCaret()
 {
   mCaret = mOriginalCaret;
 }
 
 NS_IMETHODIMP PresShell::SetCaretEnabled(PRBool aInEnable)
 {
-  nsresult result = NS_OK;
-  PRBool   oldEnabled = mCaretEnabled;
+  PRBool oldEnabled = mCaretEnabled;
 
   mCaretEnabled = aInEnable;
 
   if (mCaret && (mCaretEnabled != oldEnabled))
   {
 /*  Don't change the caret's selection here! This was an evil side-effect of SetCaretEnabled()
     nsCOMPtr<nsIDOMSelection> domSel;
     if (NS_SUCCEEDED(GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel))) && domSel)
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -666,17 +666,19 @@ nsListControlFrame::ReflowAsDropdown(nsP
                                      nsReflowStatus&          aStatus)
 {
   NS_PRECONDITION(aReflowState.ComputedHeight() == NS_UNCONSTRAINEDSIZE,
                   "We should not have a computed height here!");
   
   mMightNeedSecondPass = NS_SUBTREE_DIRTY(this) ||
     aReflowState.ShouldReflowAllKids();
 
+#ifdef DEBUG
   nscoord oldHeightOfARow = HeightOfARow();
+#endif
 
   nsHTMLReflowState state(aReflowState);
 
   nscoord oldVisibleHeight;
   if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
     // When not doing an initial reflow, and when the height is auto, start off
     // with our computed height set to what we'd expect our height to be.
     // Note: At this point, mLastDropdownComputedHeight can be
@@ -1540,23 +1542,26 @@ nsListControlFrame::RemoveOption(nsPresC
 PRBool
 nsListControlFrame::SetOptionsSelectedFromFrame(PRInt32 aStartIndex,
                                                 PRInt32 aEndIndex,
                                                 PRBool aValue,
                                                 PRBool aClearAll)
 {
   nsCOMPtr<nsISelectElement> selectElement(do_QueryInterface(mContent));
   PRBool wasChanged = PR_FALSE;
-  nsresult rv = selectElement->SetOptionsSelectedByIndex(aStartIndex,
-                                                         aEndIndex,
-                                                         aValue,
-                                                         aClearAll,
-                                                         PR_FALSE,
-                                                         PR_TRUE,
-                                                         &wasChanged);
+#ifdef DEBUG
+  nsresult rv = 
+#endif
+    selectElement->SetOptionsSelectedByIndex(aStartIndex,
+                                             aEndIndex,
+                                             aValue,
+                                             aClearAll,
+                                             PR_FALSE,
+                                             PR_TRUE,
+                                             &wasChanged);
   NS_ASSERTION(NS_SUCCEEDED(rv), "SetSelected failed");
   return wasChanged;
 }
 
 PRBool
 nsListControlFrame::ToggleOptionSelectedFromFrame(PRInt32 aIndex)
 {
   nsCOMPtr<nsIDOMHTMLOptionsCollection> options = GetOptions(mContent);
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -4256,17 +4256,19 @@ nsBlockFrame::HandleOverflowPlaceholders
  */
 PRBool
 nsBlockFrame::HandleOverflowPlaceholdersOnPulledLine(
   nsBlockReflowState& aState, nsLineBox* aLine)
 {
   // First, see if it's a line of continuation placeholders. If it
   // is, remove one and retry.
   if (aLine->mFirstChild && IsContinuationPlaceholder(aLine->mFirstChild)) {
+#ifdef DEBUG
     PRBool taken =
+#endif
       HandleOverflowPlaceholdersForPulledFrame(aState, aLine->mFirstChild);
     NS_ASSERTION(taken, "We must have removed that frame");
     return PR_TRUE;
   }
  
   // OK, it's a normal line. Scan it for floats with continuations that
   // need to be taken care of. We won't need to change the line.
   PRInt32 n = aLine->GetChildCount();
@@ -4608,18 +4610,20 @@ nsBlockFrame::GetOverflowOutOfFlows() co
 // This takes ownership of the frames
 void
 nsBlockFrame::SetOverflowOutOfFlows(const nsFrameList& aList)
 {
   if (aList.IsEmpty()) {
     if (!(GetStateBits() & NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS)) {
       return;
     }
+#ifdef DEBUG
     nsIFrame* result = static_cast<nsIFrame*>
-                                  (UnsetProperty(nsGkAtoms::overflowOutOfFlowsProperty));
+#endif
+      (UnsetProperty(nsGkAtoms::overflowOutOfFlowsProperty));
     NS_ASSERTION(result, "value should always be non-empty when state set");
     RemoveStateBits(NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS);
   } else {
     SetProperty(nsGkAtoms::overflowOutOfFlowsProperty,
                 aList.FirstChild(), nsnull);
     AddStateBits(NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS);
   }
 }
@@ -5586,18 +5590,17 @@ nsBlockFrame::StealFrame(nsPresContext* 
   }
   return NS_ERROR_UNEXPECTED;
 }
 
 void
 nsBlockFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
                                     nsIFrame*       aNextInFlow)
 {
-  nsIFrame* prevInFlow = aNextInFlow->GetPrevInFlow();
-  NS_PRECONDITION(prevInFlow, "bad next-in-flow");
+  NS_PRECONDITION(aNextInFlow->GetPrevInFlow(), "bad next-in-flow");
 
   if (NS_FRAME_IS_OVERFLOW_CONTAINER & aNextInFlow->GetStateBits()) {
     nsContainerFrame::DeleteNextInFlowChild(aPresContext, aNextInFlow);
   }
   else {
     DoRemoveFrame(aNextInFlow);
   }
 }
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -218,17 +218,20 @@ nsContainerFrame::RemoveFrame(nsIAtom*  
       //XXXfr probably should use StealFrame here. I'm not sure if we need to
       //      check the overflow lists atm, but we'll need a prescontext lookup
       //      for overflow containers once we can split abspos elements with
       //      inline containing blocks.
       if (parent == this) {
         if (!parent->mFrames.DestroyFrame(aOldFrame)) {
           // Try to remove it from our overflow list, if we have one.
           // The simplest way is to reuse StealFrame.
-          nsresult rv = StealFrame(PresContext(), aOldFrame, PR_TRUE);
+#ifdef DEBUG
+          nsresult rv =
+#endif
+            StealFrame(PresContext(), aOldFrame, PR_TRUE);
           NS_ASSERTION(NS_SUCCEEDED(rv), "Could not find frame to remove!");
           aOldFrame->Destroy();
         }
       } else {
         // This recursive call takes care of all continuations after aOldFrame,
         // so we don't need to loop anymore.
         parent->RemoveFrame(nsnull, aOldFrame);
         break;
@@ -484,18 +487,17 @@ SyncFrameViewGeometryDependentProperties
                                          nsStyleContext*  aStyleContext,
                                          nsIView*         aView,
                                          PRUint32         aFlags)
 {
   nsIViewManager* vm = aView->GetViewManager();
 
   PRBool isCanvas;
   const nsStyleBackground* bg;
-  PRBool hasBG =
-    nsCSSRendering::FindBackground(aPresContext, aFrame, &bg, &isCanvas);
+  nsCSSRendering::FindBackground(aPresContext, aFrame, &bg, &isCanvas);
 
   if (isCanvas) {
     nsIView* rootView;
     vm->GetRootView(rootView);
 
     if (aView->HasWidget() && aView == rootView &&
         IsTopLevelWidget(aPresContext)) {
       // The issue here is that the CSS 'background' propagates from the root
@@ -1098,17 +1100,19 @@ nsContainerFrame::StealFrame(nsPresConte
 /**
  * Remove and delete aNextInFlow and its next-in-flows. Updates the sibling and flow
  * pointers
  */
 void
 nsContainerFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
                                         nsIFrame*      aNextInFlow)
 {
+#ifdef DEBUG
   nsIFrame* prevInFlow = aNextInFlow->GetPrevInFlow();
+#endif
   NS_PRECONDITION(prevInFlow, "bad prev-in-flow");
 
   // If the next-in-flow has a next-in-flow then delete it, too (and
   // delete it first).
   // Do this in a loop so we don't overflow the stack for frames
   // with very many next-in-flows
   nsIFrame* nextNextInFlow = aNextInFlow->GetNextInFlow();
   if (nextNextInFlow) {
@@ -1124,17 +1128,20 @@ nsContainerFrame::DeleteNextInFlowChild(
   }
 
   aNextInFlow->Invalidate(aNextInFlow->GetOverflowRect());
 
   // Disconnect the next-in-flow from the flow list
   nsSplittableFrame::BreakFromPrevFlow(aNextInFlow);
 
   // Take the next-in-flow out of the parent's child list
-  nsresult rv = StealFrame(aPresContext, aNextInFlow);
+#ifdef DEBUG
+  nsresult rv = 
+#endif
+    StealFrame(aPresContext, aNextInFlow);
   NS_ASSERTION(NS_SUCCEEDED(rv), "StealFrame failure");
 
   // Delete the next-in-flow frame and its descendants.
   aNextInFlow->Destroy();
 
   NS_POSTCONDITION(!prevInFlow->GetNextInFlow(), "non null next-in-flow");
 }
 
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -1164,17 +1164,16 @@ nsObjectFrame::PrintPlugin(nsIRenderingC
     return;
 
   // finally we can get our plugin instance
   nsCOMPtr<nsIPluginInstance> pi;
   if (NS_FAILED(objectFrame->GetPluginInstance(*getter_AddRefs(pi))) || !pi)
     return;
 
   // now we need to setup the correct location for printing
-  nsresult rv;
   nsPluginWindow    window;
   window.window =   nsnull;
 
   // prepare embedded mode printing struct
   nsPluginPrint npprint;
   npprint.mode = nsPluginMode_Embedded;
 
   // we need to find out if we are windowless or not
@@ -1213,17 +1212,17 @@ nsObjectFrame::PrintPlugin(nsIRenderingC
   npPrintInfo.fp   = plugintmpfile;
   npprint.print.embedPrint.platformPrint = (void *)&npPrintInfo;
   /* aDirtyRect contains the right information for ps print */
   window.x =   aDirtyRect.x;
   window.y =   aDirtyRect.y;
   window.width =   aDirtyRect.width;
   window.height =   aDirtyRect.height;
   npprint.print.embedPrint.window        = window;
-  rv = pi->Print(&npprint);
+  nsresult rv = pi->Print(&npprint);
   if (NS_FAILED(rv)) {
     PR_LOG(nsObjectFrameLM, PR_LOG_DEBUG, ("error: plugin returned failure %lx\n", (long)rv));
     fclose(plugintmpfile);
     return;
   }
 
   /* Send data to printer */
   rv = aRenderingContext.RenderEPS(aDirtyRect, plugintmpfile);
@@ -1236,17 +1235,17 @@ nsObjectFrame::PrintPlugin(nsIRenderingC
 #elif defined(XP_OS2)
   void *hps = aRenderingContext.GetNativeGraphicData(nsIRenderingContext::NATIVE_OS2_PS);
   if (!hps)
     return;
 
   npprint.print.embedPrint.platformPrint = hps;
   npprint.print.embedPrint.window = window;
   // send off print info to plugin
-  rv = pi->Print(&npprint);
+  pi->Print(&npprint);
 #elif defined(XP_WIN)
 
   /* On Windows, we use the win32 printing surface to print.  This, in
    * turn, uses the Cairo paginated surface, which in turn uses the
    * meta surface to record all operations and then play them back.
    * This doesn't work too well for plugins, because if plugins render
    * directly into the DC, the meta surface won't have any knowledge
    * of them, and so at the end when it actually does the replay step,
@@ -1290,17 +1289,17 @@ nsObjectFrame::PrintPlugin(nsIRenderingC
   do {
     HDC dc = nativeDraw.BeginNativeDrawing();
     if (!dc)
       return;
 
     npprint.print.embedPrint.platformPrint = dc;
     npprint.print.embedPrint.window = window;
     // send off print info to plugin
-    rv = pi->Print(&npprint);
+    pi->Print(&npprint);
 
     nativeDraw.EndNativeDrawing();
   } while (nativeDraw.ShouldRenderAgain());
   nativeDraw.PaintToContext();
 
   ctx->PopGroupToSource();
   ctx->Paint();
 
@@ -1327,17 +1326,17 @@ nsObjectFrame::PrintPlugin(nsIRenderingC
   void* dc;
   dc = aRenderingContext.GetNativeGraphicData(nsIRenderingContext::NATIVE_WINDOWS_DC);
   if (!dc)
     return; // no dc implemented so quit
 
   npprint.print.embedPrint.platformPrint = dc;
   npprint.print.embedPrint.window = window;
   // send off print info to plugin
-    rv = pi->Print(&npprint);
+  pi->Print(&npprint);
 #endif
 
   // XXX Nav 4.x always sent a SetWindow call after print. Should we do the same?
   nsDidReflowStatus status = NS_FRAME_REFLOW_FINISHED; // should we use a special status?
   frame->DidReflow(presContext,
                    nsnull, status);  // DidReflow will take care of it
 }
 
--- a/layout/style/nsCSSDataBlock.cpp
+++ b/layout/style/nsCSSDataBlock.cpp
@@ -692,17 +692,19 @@ nsCSSExpandedDataBlock::ComputeSize()
             continue;
         for (PRInt32 iLow = 0; iLow < kPropertiesSetChunkSize; ++iLow) {
             if ((mPropertiesSet[iHigh] & (1 << iLow)) == 0)
                 continue;
             nsCSSProperty iProp =
                 nsCSSProperty(iHigh * kPropertiesSetChunkSize + iLow);
             NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands,
                          "out of range");
+#ifdef DEBUG
             void *prop = PropertyAt(iProp);
+#endif
             PRUint32 increment = 0;
             switch (nsCSSProps::kTypeTable[iProp]) {
                 case eCSSType_Value: {
 #ifdef DEBUG
                     nsCSSValue* val = static_cast<nsCSSValue*>(prop);
                     NS_ASSERTION(val->GetUnit() != eCSSUnit_Null,
                                  "null value while computing size");
 #endif
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -885,21 +885,16 @@ nsresult nsComputedDOMStyle::GetMozTrans
   /* Now, we need to convert the matrix into a string.  We'll start by taking
    * the first four entries and converting them directly to floating-point
    * values.
    */
   for (PRInt32 index = 0; index < NUM_FLOATS; ++index) {
     resultString.AppendFloat(display->mTransform.GetMainMatrixEntry(index));
     resultString.Append(NS_LITERAL_STRING(", "));
   }
-  
-  /* For the next part, we need to compute the translate values.  This means
-   * that we'll need to get the width and height of this object.
-   */
-  PRInt32 cssPxWidth = 0, cssPxHeight = 0;
 
   /* Use the inner frame for width and height.  If we fail, assume zero.
    * TODO: There is no good way for us to represent the case where there's no
    * frame, which is problematic.  The reason is that when we have percentage
    * transforms, there are a total of four stored matrix entries that influence
    * the transform based on the size of the element.  However, this poses a
    * problem, because only two of these values can be explicitly referenced
    * using the named transforms.  Until a real solution is found, we'll just
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -3455,36 +3455,42 @@ nsRuleNode::ComputeDisplayData(void* aSt
 
     /* If X coordinate is an enumerated type, handle it explicitly. */
     if (eCSSUnit_Enumerated == displayData.mTransformOrigin.mXValue.GetUnit())
       display->mTransformOrigin[0].SetPercentValue
         (GetFloatFromBoxPosition
          (displayData.mTransformOrigin.mXValue.GetIntValue()));
     else {
       /* Convert lengths, percents, and inherit.  Default value is 50%. */
-      PRBool result = SetCoord(displayData.mTransformOrigin.mXValue,
-                               display->mTransformOrigin[0],
-                               parentDisplay->mTransformOrigin[0],
-                               SETCOORD_LPH | SETCOORD_INITIAL_HALF,
-                               aContext, mPresContext, aInherited);
+#ifdef DEBUG
+      PRBool result =
+#endif
+        SetCoord(displayData.mTransformOrigin.mXValue,
+                 display->mTransformOrigin[0],
+                 parentDisplay->mTransformOrigin[0],
+                 SETCOORD_LPH | SETCOORD_INITIAL_HALF,
+                 aContext, mPresContext, aInherited);
       NS_ASSERTION(result, "Malformed -moz-transform-origin parse!");
     }
 
     /* If Y coordinate is an enumerated type, handle it explicitly. */
     if (eCSSUnit_Enumerated == displayData.mTransformOrigin.mYValue.GetUnit())
       display->mTransformOrigin[1].SetPercentValue
         (GetFloatFromBoxPosition
          (displayData.mTransformOrigin.mYValue.GetIntValue()));
     else {
       /* Convert lengths, percents, initial, inherit. */
-      PRBool result = SetCoord(displayData.mTransformOrigin.mYValue,
-                               display->mTransformOrigin[1],
-                               parentDisplay->mTransformOrigin[1],
-                               SETCOORD_LPH | SETCOORD_INITIAL_HALF,
-                               aContext, mPresContext, aInherited);
+#ifdef DEBUG
+      PRBool result =
+#endif
+        SetCoord(displayData.mTransformOrigin.mYValue,
+                 display->mTransformOrigin[1],
+                 parentDisplay->mTransformOrigin[1],
+                 SETCOORD_LPH | SETCOORD_INITIAL_HALF,
+                 aContext, mPresContext, aInherited);
       NS_ASSERTION(result, "Malformed -moz-transform-origin parse!");
     }
   }
 
   COMPUTE_END_RESET(Display, display)
 }
 
 const void*
--- a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
@@ -414,17 +414,20 @@ nsSVGOuterSVGFrame::DidReflow(nsPresCont
       kid = kid->GetNextSibling();
     }
     
     UnsuspendRedraw(); // For the SuspendRedraw in InitSVG
   } else {
     // Now that all viewport establishing descendants have their correct size,
     // tell our foreignObject descendants to reflow their children.
     if (mForeignObjectHash.IsInitialized()) {
-      PRUint32 count = mForeignObjectHash.EnumerateEntries(ReflowForeignObject, nsnull);
+#ifdef DEBUG
+      PRUint32 count =
+#endif
+        mForeignObjectHash.EnumerateEntries(ReflowForeignObject, nsnull);
       NS_ASSERTION(count == mForeignObjectHash.Count(),
                    "We didn't reflow all our nsSVGForeignObjectFrames!");
     }
   }
   
   return rv;
 }
 
--- a/layout/xul/base/src/nsBox.cpp
+++ b/layout/xul/base/src/nsBox.cpp
@@ -752,35 +752,35 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& 
     // we will assume 0 means not set.
     if (position->mMinWidth.GetUnit() == eStyleUnit_Coord) {
         nscoord min = position->mMinWidth.GetCoordValue();
         if (min && (!widthSet || (min > aSize.width && canOverride))) {
            aSize.width = min;
            widthSet = PR_TRUE;
         }
     } else if (position->mMinWidth.GetUnit() == eStyleUnit_Percent) {
-        float min = position->mMinWidth.GetPercentValue();
-        NS_ASSERTION(min == 0.0f, "Non-zero percentage values not currently supported");
+        NS_ASSERTION(position->mMinWidth.GetPercentValue() == 0.0f,
+          "Non-zero percentage values not currently supported");
         aSize.width = 0;
         widthSet = PR_TRUE;
     }
     // XXX Handle eStyleUnit_Enumerated?
     // (Handling the eStyleUnit_Enumerated types requires
     // GetPrefSize/GetMinSize methods that don't consider
     // (min-/max-/)(width/height) properties.
 
     if (position->mMinHeight.GetUnit() == eStyleUnit_Coord) {
         nscoord min = position->mMinHeight.GetCoordValue();
         if (min && (!heightSet || (min > aSize.height && canOverride))) {
            aSize.height = min;
            heightSet = PR_TRUE;
         }
     } else if (position->mMinHeight.GetUnit() == eStyleUnit_Percent) {
-        float min = position->mMinHeight.GetPercentValue();
-        NS_ASSERTION(min == 0.0f, "Non-zero percentage values not currently supported");
+        NS_ASSERTION(position->mMinHeight.GetPercentValue() == 0.0f,
+          "Non-zero percentage values not currently supported");
         aSize.height = 0;
         heightSet = PR_TRUE;
     }
 
     nsIContent* content = aBox->GetContent();
     if (content) {
         nsAutoString value;
         PRInt32 error;
--- a/layout/xul/base/src/nsXULPopupManager.cpp
+++ b/layout/xul/base/src/nsXULPopupManager.cpp
@@ -526,17 +526,17 @@ CheckCaretDrawingState(nsIDocument *aDoc
   if (!focusedDoc)
     return;
 
   nsIPresShell* presShell = focusedDoc->GetPrimaryShell();
   if (!presShell)
     return;
 
   nsRefPtr<nsCaret> caret;
-  nsresult res = presShell->GetCaret(getter_AddRefs(caret));
+  presShell->GetCaret(getter_AddRefs(caret));
   if (!caret)
     return;
   caret->CheckCaretDrawingState();
 
 }
 
 void
 nsXULPopupManager::ShowPopupCallback(nsIContent* aPopup,
--- a/layout/xul/base/src/nsXULTooltipListener.cpp
+++ b/layout/xul/base/src/nsXULTooltipListener.cpp
@@ -476,17 +476,20 @@ GetTreeCellCoords(nsITreeBoxObject* aTre
 static void
 SetTitletipLabel(nsITreeBoxObject* aTreeBox, nsIContent* aTooltip,
                  PRInt32 aRow, nsITreeColumn* aCol)
 {
   nsCOMPtr<nsITreeView> view;
   aTreeBox->GetView(getter_AddRefs(view));
   if (view) {
     nsAutoString label;
-    nsresult rv = view->GetCellText(aRow, aCol, label);
+#ifdef DEBUG
+    nsresult rv = 
+#endif
+      view->GetCellText(aRow, aCol, label);
     NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Couldn't get the cell text!");
     aTooltip->SetAttr(kNameSpaceID_None, nsGkAtoms::label, label, PR_TRUE);
   }
 }
 #endif
 
 void
 nsXULTooltipListener::LaunchTooltip()
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -1165,17 +1165,20 @@ nsTreeBodyFrame::GetCoordsForCellItem(PR
   nsRect theRect;
 
   nsPresContext* presContext = PresContext();
 
   for (nsTreeColumn* currCol = mColumns->GetFirstColumn(); currCol; currCol = currCol->GetNext()) {
 
     // The Rect for the current cell.
     nscoord colWidth;
-    nsresult rv = currCol->GetWidthInTwips(this, &colWidth);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      currCol->GetWidthInTwips(this, &colWidth);
     NS_ASSERTION(NS_SUCCEEDED(rv), "invalid column");
 
     nsRect cellRect(currX, mInnerBox.y + mRowHeight * (aRow - mTopRowIndex),
                     colWidth, mRowHeight);
 
     // Check the ID of the current column to see if it matches. If it doesn't 
     // increment the current X value and continue to the next column.
     if (currCol != aCol) {
@@ -3737,17 +3740,20 @@ nsTreeBodyFrame::PaintDropFeedback(const
   // Paint the drop feedback in between rows.
 
   nscoord currX;
 
   // Adjust for the primary cell.
   nsTreeColumn* primaryCol = mColumns->GetPrimaryColumn();
 
   if (primaryCol) {
-    nsresult rv = primaryCol->GetXInTwips(this, &currX);
+#ifdef DEBUG
+    nsresult rv =
+#endif
+      primaryCol->GetXInTwips(this, &currX);
     NS_ASSERTION(NS_SUCCEEDED(rv), "primary column is invalid?");
 
     currX += aPt.x - mHorzPosition;
   } else {
     currX = aDropFeedbackRect.x;
   }
 
   PrefillPropertyArray(mSlots->mDropRow, primaryCol);