From c65f7936f76303c35113e32f27bc7555a911deaf Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Fri, 16 Feb 2007 08:04:44 +0000 Subject: [PATCH] remove unused variables, other warning fixes. no bug. r/sr=bz git-svn-id: svn://10.0.0.236/trunk@220399 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsPageFrame.cpp | 4 ++-- mozilla/layout/printing/nsPrintEngine.cpp | 3 +-- mozilla/layout/printing/nsPrintObject.cpp | 2 +- mozilla/layout/style/nsCSSLoader.cpp | 1 - mozilla/layout/xul/base/src/grid/nsGrid.cpp | 2 -- mozilla/layout/xul/base/src/nsStackLayout.cpp | 1 - mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp | 8 +++----- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index 7ccc2831631..4d1ac5ad47c 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -576,8 +576,8 @@ nsPageFrame::PaintPageContent(nsIRenderingContext& aRenderingContext, rect, backgroundRect, *border, *padding, PR_TRUE); - nsresult rv = nsLayoutUtils::PaintFrame(&aRenderingContext, pageContentFrame, - nsRegion(rect), NS_RGBA(0,0,0,0)); + nsLayoutUtils::PaintFrame(&aRenderingContext, pageContentFrame, + nsRegion(rect), NS_RGBA(0,0,0,0)); aRenderingContext.PopState(); } diff --git a/mozilla/layout/printing/nsPrintEngine.cpp b/mozilla/layout/printing/nsPrintEngine.cpp index e166d72fd0d..eefd630c58d 100644 --- a/mozilla/layout/printing/nsPrintEngine.cpp +++ b/mozilla/layout/printing/nsPrintEngine.cpp @@ -2346,9 +2346,8 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO) SetIsPrinting(PR_FALSE); #endif } else { - nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame(); - #ifdef EXTENDED_DEBUG_PRINTING + nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame(); if (aPO->IsPrintable()) { char * docStr; char * urlStr; diff --git a/mozilla/layout/printing/nsPrintObject.cpp b/mozilla/layout/printing/nsPrintObject.cpp index 04a8b747a49..60abe2f2cfd 100644 --- a/mozilla/layout/printing/nsPrintObject.cpp +++ b/mozilla/layout/printing/nsPrintObject.cpp @@ -43,7 +43,7 @@ //-- nsPrintObject Class Impl //--------------------------------------------------- nsPrintObject::nsPrintObject() : - mFrameType(eFrame), mContent(nsnull), mParent(nsnull), + mContent(nsnull), mFrameType(eFrame), mParent(nsnull), mHasBeenPrinted(PR_FALSE), mDontPrint(PR_TRUE), mPrintAsIs(PR_FALSE), mSharedPresShell(PR_FALSE), mInvisible(PR_FALSE), mShrinkRatio(1.0), mZoomRatio(1.0) diff --git a/mozilla/layout/style/nsCSSLoader.cpp b/mozilla/layout/style/nsCSSLoader.cpp index 88e2ac98e3c..22c3109116b 100644 --- a/mozilla/layout/style/nsCSSLoader.cpp +++ b/mozilla/layout/style/nsCSSLoader.cpp @@ -1120,7 +1120,6 @@ CSSLoaderImpl::InsertSheetInDoc(nsICSSStyleSheet* aSheet, NS_PRECONDITION(aDocument, "Must have a document to insert into"); // all nodes that link in sheets should be implementing nsIDOM3Node - nsresult rv = NS_OK; // XXX Need to cancel pending sheet loads for this element, if any diff --git a/mozilla/layout/xul/base/src/grid/nsGrid.cpp b/mozilla/layout/xul/base/src/grid/nsGrid.cpp index 1a434a69035..8bd67d4fe54 100644 --- a/mozilla/layout/xul/base/src/grid/nsGrid.cpp +++ b/mozilla/layout/xul/base/src/grid/nsGrid.cpp @@ -807,8 +807,6 @@ nsGrid::GetRowOffsets(nsBoxLayoutState& aState, PRInt32 aIndex, nscoord& aTop, n // pick the largest top border or bottom border PRInt32 count = GetColumnCount(aIsHorizontal); - PRBool isCollapsed = PR_FALSE; - for (PRInt32 i=0; i < count; i++) { nsMargin totalChildBorderPadding(0,0,0,0); diff --git a/mozilla/layout/xul/base/src/nsStackLayout.cpp b/mozilla/layout/xul/base/src/nsStackLayout.cpp index 0627fee00e4..9f1d2d1cb80 100644 --- a/mozilla/layout/xul/base/src/nsStackLayout.cpp +++ b/mozilla/layout/xul/base/src/nsStackLayout.cpp @@ -213,7 +213,6 @@ nsStackLayout::AddOffset(nsBoxLayoutState& aState, nsIBox* aChild, nsSize& aSize nsIContent* content = aChild->GetContent(); if (content) { - nsPresContext* presContext = aState.PresContext(); nsAutoString value; PRInt32 error; diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 89960e4b7d1..da614e86ced 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -146,12 +146,12 @@ NS_INTERFACE_MAP_END_INHERITING(nsLeafBoxFrame) // Constructor nsTreeBodyFrame::nsTreeBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) :nsLeafBoxFrame(aPresShell, aContext), + mTopRowIndex(0), mHorzPosition(0), mHorzWidth(0), mRowHeight(0), mIndentation(0), mStringWidth(-1), - mTopRowIndex(0), mFocused(PR_FALSE), mHasFixedRowCount(PR_FALSE), mVerticalOverflow(PR_FALSE), @@ -890,7 +890,6 @@ nsTreeBodyFrame::InvalidateScrollbars(const ScrollParts& aParts) if (mUpdateBatchNest || !mView) return; nsWeakFrame weakFrame(this); - nsPresContext* presContext = GetPresContext(); nsCOMPtr vScrollbar = aParts.mVScrollbarContent; nsCOMPtr hScrollbar = aParts.mHScrollbarContent; @@ -2484,9 +2483,9 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext, mSlots->mDropAllowed = PR_FALSE; InvalidateDropFeedback(lastDropRow, lastDropOrient); } -#if !defined(XP_MAC) && !defined(XP_MACOSX) +#if !defined(XP_MACOSX) if (!lastScrollLines) { - // Cancel any previosly initialized timer. + // Cancel any previously initialized timer. if (mSlots->mTimer) { mSlots->mTimer->Cancel(); mSlots->mTimer = nsnull; @@ -3609,7 +3608,6 @@ nsTreeBodyFrame::PaintDropFeedback(const nsRect& aDropFeedbackRect, } const nsStylePosition* stylePosition = feedbackContext->GetStylePosition(); - nsPresContext* presContext = GetPresContext(); // Obtain the width for the drop feedback or use default value. nscoord width;