diff --git a/content/base/src/nsDOMAttributeMap.cpp b/content/base/src/nsDOMAttributeMap.cpp index 913c9066742b..cb806167a52c 100644 --- a/content/base/src/nsDOMAttributeMap.cpp +++ b/content/base/src/nsDOMAttributeMap.cpp @@ -470,9 +470,7 @@ nsDOMAttributeMap::SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap, PRUint32* aResult) { if (!aResult) return NS_ERROR_NULL_POINTER; - nsDOMAttributeMap* map = (nsDOMAttributeMap*) aMap; - PRUint32 sum = sizeof(nsDOMAttributeMap); - *aResult = sum; + *aResult = sizeof(nsDOMAttributeMap); return NS_OK; } #endif diff --git a/content/base/src/nsDocumentEncoder.cpp b/content/base/src/nsDocumentEncoder.cpp index 7c8f9804564b..35c9cea8f935 100644 --- a/content/base/src/nsDocumentEncoder.cpp +++ b/content/base/src/nsDocumentEncoder.cpp @@ -1128,7 +1128,7 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection) NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(currentItem, NS_ERROR_FAILURE); - nsCOMPtr range( do_QueryInterface(currentItem) ); + range = do_QueryInterface(currentItem); NS_ENSURE_TRUE(range, NS_ERROR_FAILURE); nsCOMPtr myRange; range->CloneRange(getter_AddRefs(myRange)); diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 32a743297a9f..e3fc57410c20 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -564,7 +564,7 @@ nsHTMLInputElement::SetPresStateChecked(nsIHTMLContent * aHTMLContent, // Obtain the value property from the presentation state. if (presState) { - nsAutoString value; value.AssignWithConversion( aValue ? "1" : "0" ); + nsAutoString value; value.Assign(aValue ? NS_LITERAL_STRING("1") : NS_LITERAL_STRING("0")); presState->SetStateProperty(NS_LITERAL_STRING("checked"), value); } } @@ -587,7 +587,7 @@ nsHTMLInputElement::SetChecked(PRBool aValue) nsIFormControlFrame* formControlFrame = nsnull; if (NS_SUCCEEDED(GetPrimaryFrame(this, formControlFrame))) { // the value is being toggled - nsAutoString val; val.AssignWithConversion(aValue ? "1" : "0"); + nsAutoString val; val.Assign(aValue ? NS_LITERAL_STRING("1") : NS_LITERAL_STRING("0")); formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, val); } @@ -608,7 +608,6 @@ nsHTMLInputElement::SetChecked(PRBool aValue) SetPresStateChecked(this, stateType, aValue); if (stateType == nsIStatefulFrame::eRadioType) { - nsIDOMHTMLInputElement *radioElement = this; nsAutoString name; GetName(name); diff --git a/content/html/content/src/nsHTMLTableRowElement.cpp b/content/html/content/src/nsHTMLTableRowElement.cpp index df312c61d284..fc73bf11516f 100644 --- a/content/html/content/src/nsHTMLTableRowElement.cpp +++ b/content/html/content/src/nsHTMLTableRowElement.cpp @@ -577,8 +577,6 @@ nsHTMLTableRowElement::InsertCell(PRInt32 aIndex, nsIDOMHTMLElement** aValue) { *aValue = nsnull; - PRInt32 refIndex = (0 <= aIndex) ? aIndex : 0; - nsCOMPtr cells; GetCells(getter_AddRefs(cells)); diff --git a/dom/src/base/nsJSWindow.cpp b/dom/src/base/nsJSWindow.cpp index 63b5302798f6..fd0f577b40d5 100644 --- a/dom/src/base/nsJSWindow.cpp +++ b/dom/src/base/nsJSWindow.cpp @@ -1027,7 +1027,7 @@ GetWindowProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { JSObject* global = JS_GetGlobalObject(cx); if (global != obj) { - nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj); + secMan = nsJSUtils::nsGetSecurityManager(cx, obj); rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW_SCRIPTGLOBALS, PR_FALSE); diff --git a/dom/src/html/nsJSHTMLSelectElement.cpp b/dom/src/html/nsJSHTMLSelectElement.cpp index 7652397b2906..f8fa09d7017e 100644 --- a/dom/src/html/nsJSHTMLSelectElement.cpp +++ b/dom/src/html/nsJSHTMLSelectElement.cpp @@ -230,7 +230,6 @@ GetHTMLSelectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) nsIDOMNode* prop; nsIDOMNSHTMLSelectElement* b; if (NS_OK == a->QueryInterface(kINSHTMLSelectElementIID, (void **)&b)) { - nsresult result = NS_OK; rv = b->Item(JSVAL_TO_INT(id), &prop); if (NS_SUCCEEDED(rv)) { // get the js object diff --git a/embedding/browser/webBrowser/nsWebBrowserPersist.cpp b/embedding/browser/webBrowser/nsWebBrowserPersist.cpp index 32c7c75b4655..57a75fe9677f 100644 --- a/embedding/browser/webBrowser/nsWebBrowserPersist.cpp +++ b/embedding/browser/webBrowser/nsWebBrowserPersist.cpp @@ -61,10 +61,10 @@ struct URIData }; nsWebBrowserPersist::nsWebBrowserPersist() : - mFirstAndOnlyUse(PR_TRUE), mFileCounter(1), mFrameCounter(1), - mTaskCounter(0) + mTaskCounter(0), + mFirstAndOnlyUse(PR_TRUE) { NS_INIT_REFCNT(); } diff --git a/extensions/cookie/nsCookie.cpp b/extensions/cookie/nsCookie.cpp index 87b678e4d1c7..a05c61ff4cc1 100644 --- a/extensions/cookie/nsCookie.cpp +++ b/extensions/cookie/nsCookie.cpp @@ -1376,7 +1376,7 @@ permission_Unblock(char * host, PRInt32 type) { if (typeStruct->permission == PR_FALSE) { hostStruct->permissionList->RemoveElementAt(typeIndex); /* if no more types are present, remove the entry */ - PRInt32 count2 = hostStruct->permissionList->Count(); + count2 = hostStruct->permissionList->Count(); if (count2 == 0) { PR_FREEIF(hostStruct->permissionList); cookie_permissionList->RemoveElementAt(hostIndex); diff --git a/gfx/src/gtk/nsDeviceContextGTK.cpp b/gfx/src/gtk/nsDeviceContextGTK.cpp index c4e6c84b8394..cc272098cffb 100644 --- a/gfx/src/gtk/nsDeviceContextGTK.cpp +++ b/gfx/src/gtk/nsDeviceContextGTK.cpp @@ -102,7 +102,6 @@ NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget) // get the screen object and its width/height // XXXRight now this will only get the primary monitor. - nsresult ignore; if (!mScreenManager) mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1"); if (!mScreenManager) { diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 253551bd9d27..f5e0adcc12a4 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -6959,7 +6959,6 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsIPresShell* aPresShell, // Initialize the new frame nsIFrame* newFrame = nsnull; - nsIFrame* ignore = nsnull; //nsSVGTableCreator svgTableCreator(aPresShell); // Used to make table views. // See if the element is absolute or fixed positioned @@ -7203,8 +7202,8 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe (lastChild == aFrameItems.lastChild))) { // When there is no explicit frame to create, assume it's a // container and let display style dictate the rest - const nsStyleDisplay* display = (const nsStyleDisplay*) - styleContext->GetStyleData(eStyleStruct_Display); + display = NS_STATIC_CAST(const nsStyleDisplay*, + styleContext->GetStyleData(eStyleStruct_Display)); rv = ConstructFrameByDisplayType(aPresShell, aPresContext, aState, display, aContent, aParentFrame, styleContext, aFrameItems); diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index bb0c2ceb5833..82395343c817 100644 --- a/layout/base/nsCaret.cpp +++ b/layout/base/nsCaret.cpp @@ -75,8 +75,8 @@ nsCaret::nsCaret() , mCaretTwipsWidth(-1) , mCaretPixelsWidth(1) , mVisible(PR_FALSE) -, mReadOnly(PR_FALSE) , mDrawn(PR_FALSE) +, mReadOnly(PR_FALSE) , mShowWhenSelection(PR_FALSE) , mLastCaretFrame(nsnull) , mLastCaretView(nsnull) @@ -745,7 +745,6 @@ void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordTy // coorinates relative to the view we are going to use for drawing if (coordType == eRenderingViewCoordinates) { - nsIView* startingView = theView; nsIScrollableView* scrollableView = nsnull; nsPoint drawViewOffset(0, 0); // offset to the view we are using to draw diff --git a/layout/base/src/nsCaret.cpp b/layout/base/src/nsCaret.cpp index bb0c2ceb5833..82395343c817 100644 --- a/layout/base/src/nsCaret.cpp +++ b/layout/base/src/nsCaret.cpp @@ -75,8 +75,8 @@ nsCaret::nsCaret() , mCaretTwipsWidth(-1) , mCaretPixelsWidth(1) , mVisible(PR_FALSE) -, mReadOnly(PR_FALSE) , mDrawn(PR_FALSE) +, mReadOnly(PR_FALSE) , mShowWhenSelection(PR_FALSE) , mLastCaretFrame(nsnull) , mLastCaretView(nsnull) @@ -745,7 +745,6 @@ void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordTy // coorinates relative to the view we are going to use for drawing if (coordType == eRenderingViewCoordinates) { - nsIView* startingView = theView; nsIScrollableView* scrollableView = nsnull; nsPoint drawViewOffset(0, 0); // offset to the view we are using to draw diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 3b7abe6d30dc..947eb0b01fe9 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1365,7 +1365,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext, aReflowState.reflowCommand->GetNext(incrementalChild); nsRect rect; plainLstFrame->GetRect(rect); - nsresult rvv = plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus); + plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus); aDesiredSize.width = mCacheSize.width; aDesiredSize.height = mCacheSize.height; diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 49b848f9fc13..d62059231874 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -3068,7 +3068,6 @@ nsListControlFrame::IsTargetOptionDisabled(PRBool &aIsDisabled) NS_IMETHODIMP nsListControlFrame::IsOptionDisabled(PRInt32 anIndex, PRBool &aIsDisabled) { - PRBool isOptDisabled = PR_FALSE; nsCOMPtr options = getter_AddRefs(GetOptions(mContent)); nsCOMPtr optionElement; if (options) { diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index dc7a3738c1cf..dc983bc891e1 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -146,9 +146,6 @@ nsContainerFrame::PaintChildren(nsIPresContext* aPresContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer) { - const nsStyleDisplay* disp = (const nsStyleDisplay*) - mStyleContext->GetStyleData(eStyleStruct_Display); - nsIFrame* kid = mFrames.FirstChild(); while (nsnull != kid) { PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer); diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 255c534b8992..816d5acff9cf 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -358,9 +358,13 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext, { PRBool cancelledReflow = PR_FALSE; - if (mLowSrcImageLoader != nsnull && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) { - PRBool gotDesiredSize = mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize); - /*if (gotDesiredSize) { + if (mLowSrcImageLoader && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) { +#ifdef DEBUG_RODS + PRBool gotDesiredSize = +#endif + mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize); +#ifdef DEBUG_RODS + if (gotDesiredSize) { // We have our "final" desired size. Cancel any pending // incremental reflows aimed at this frame. nsIPresShell* shell; @@ -369,7 +373,8 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext, shell->CancelReflowCommand(this, nsnull); NS_RELEASE(shell); } - }*/ + } +#endif } // Must ask for desiredSize to start loading of image diff --git a/layout/generic/nsSpacerFrame.cpp b/layout/generic/nsSpacerFrame.cpp index 7993d1dca78a..0fead047d086 100644 --- a/layout/generic/nsSpacerFrame.cpp +++ b/layout/generic/nsSpacerFrame.cpp @@ -91,20 +91,12 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext, aMetrics.ascent = 0; aMetrics.descent = 0; - nscoord width = 0; - nscoord height = 0; - const nsStylePosition* position; GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position); PRUint8 type = GetType(); switch (type) { case TYPE_WORD: - if (0 != width) { - if (eStyleUnit_Coord == position->mWidth.GetUnit()) { - aMetrics.width = position->mWidth.GetCoordValue(); - } - } break; case TYPE_LINE: diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index c45cb5e9e688..e6cbfa9a67ef 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, // XXX_perf: This can be done incrementally nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height; if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) { - nsLineBox* line = mLines; + line = mLines; while (nsnull != line) { // Compute min and max x/y values for the reflowed frame's // combined areas diff --git a/layout/html/base/src/nsContainerFrame.cpp b/layout/html/base/src/nsContainerFrame.cpp index dc7a3738c1cf..dc983bc891e1 100644 --- a/layout/html/base/src/nsContainerFrame.cpp +++ b/layout/html/base/src/nsContainerFrame.cpp @@ -146,9 +146,6 @@ nsContainerFrame::PaintChildren(nsIPresContext* aPresContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer) { - const nsStyleDisplay* disp = (const nsStyleDisplay*) - mStyleContext->GetStyleData(eStyleStruct_Display); - nsIFrame* kid = mFrames.FirstChild(); while (nsnull != kid) { PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer); diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index 255c534b8992..816d5acff9cf 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -358,9 +358,13 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext, { PRBool cancelledReflow = PR_FALSE; - if (mLowSrcImageLoader != nsnull && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) { - PRBool gotDesiredSize = mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize); - /*if (gotDesiredSize) { + if (mLowSrcImageLoader && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) { +#ifdef DEBUG_RODS + PRBool gotDesiredSize = +#endif + mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize); +#ifdef DEBUG_RODS + if (gotDesiredSize) { // We have our "final" desired size. Cancel any pending // incremental reflows aimed at this frame. nsIPresShell* shell; @@ -369,7 +373,8 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext, shell->CancelReflowCommand(this, nsnull); NS_RELEASE(shell); } - }*/ + } +#endif } // Must ask for desiredSize to start loading of image diff --git a/layout/html/base/src/nsSpacerFrame.cpp b/layout/html/base/src/nsSpacerFrame.cpp index 7993d1dca78a..0fead047d086 100644 --- a/layout/html/base/src/nsSpacerFrame.cpp +++ b/layout/html/base/src/nsSpacerFrame.cpp @@ -91,20 +91,12 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext, aMetrics.ascent = 0; aMetrics.descent = 0; - nscoord width = 0; - nscoord height = 0; - const nsStylePosition* position; GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position); PRUint8 type = GetType(); switch (type) { case TYPE_WORD: - if (0 != width) { - if (eStyleUnit_Coord == position->mWidth.GetUnit()) { - aMetrics.width = position->mWidth.GetCoordValue(); - } - } break; case TYPE_LINE: diff --git a/layout/html/forms/src/nsComboboxControlFrame.cpp b/layout/html/forms/src/nsComboboxControlFrame.cpp index 3b7abe6d30dc..947eb0b01fe9 100644 --- a/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -1365,7 +1365,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext, aReflowState.reflowCommand->GetNext(incrementalChild); nsRect rect; plainLstFrame->GetRect(rect); - nsresult rvv = plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus); + plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus); aDesiredSize.width = mCacheSize.width; aDesiredSize.height = mCacheSize.height; diff --git a/layout/html/forms/src/nsFormFrame.cpp b/layout/html/forms/src/nsFormFrame.cpp index 153bf1be4e5c..8abfc72a54b2 100644 --- a/layout/html/forms/src/nsFormFrame.cpp +++ b/layout/html/forms/src/nsFormFrame.cpp @@ -666,7 +666,7 @@ NS_NewFormFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRUint32 aFlags) return NS_OK; } -#ifdef NS_DEBUG +#if 0 PRIVATE void DebugPrint(char* aLabel, nsString aString) diff --git a/layout/html/forms/src/nsListControlFrame.cpp b/layout/html/forms/src/nsListControlFrame.cpp index 49b848f9fc13..d62059231874 100644 --- a/layout/html/forms/src/nsListControlFrame.cpp +++ b/layout/html/forms/src/nsListControlFrame.cpp @@ -3068,7 +3068,6 @@ nsListControlFrame::IsTargetOptionDisabled(PRBool &aIsDisabled) NS_IMETHODIMP nsListControlFrame::IsOptionDisabled(PRInt32 anIndex, PRBool &aIsDisabled) { - PRBool isOptDisabled = PR_FALSE; nsCOMPtr options = getter_AddRefs(GetOptions(mContent)); nsCOMPtr optionElement; if (options) { diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 253551bd9d27..f5e0adcc12a4 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6959,7 +6959,6 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsIPresShell* aPresShell, // Initialize the new frame nsIFrame* newFrame = nsnull; - nsIFrame* ignore = nsnull; //nsSVGTableCreator svgTableCreator(aPresShell); // Used to make table views. // See if the element is absolute or fixed positioned @@ -7203,8 +7202,8 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe (lastChild == aFrameItems.lastChild))) { // When there is no explicit frame to create, assume it's a // container and let display style dictate the rest - const nsStyleDisplay* display = (const nsStyleDisplay*) - styleContext->GetStyleData(eStyleStruct_Display); + display = NS_STATIC_CAST(const nsStyleDisplay*, + styleContext->GetStyleData(eStyleStruct_Display)); rv = ConstructFrameByDisplayType(aPresShell, aPresContext, aState, display, aContent, aParentFrame, styleContext, aFrameItems); diff --git a/layout/html/table/src/BasicTableLayoutStrategy.cpp b/layout/html/table/src/BasicTableLayoutStrategy.cpp index 000402e9934c..676747995df7 100644 --- a/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -746,7 +746,6 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd colFrame->GetWidth(aWidthIndex + NUM_MAJOR_WIDTHS)); colWidth = PR_MAX(colWidth, minWidth); - nscoord numeratorMin = 0; nscoord numeratorPct = 0; nscoord numeratorFix = 0; nscoord numeratorAutoDes = 0; @@ -1039,7 +1038,6 @@ BasicTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre colFrame->SetWidth(MIN_PRO, colFrame->GetMinWidth()); } else if ((rawProp > 0) && (rawPropTotal > 0)) { - nscoord desWidth = colFrame->GetDesWidth(); nscoord propWidth = NSToCoordRound( ((float)maxPropTotal) * ((float)rawProp) / (float)rawPropTotal ) ; propWidth = nsTableFrame::RoundToPixel(propWidth, aPixelToTwips); colFrame->SetWidth(MIN_PRO, PR_MAX(propWidth, colFrame->GetMinWidth())); @@ -1329,7 +1327,6 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow } // end for (colX .. float perTotal = 0.0f; // total of percentage constrained cols and/or cells in cols - nscoord fixWidthTotal = 0; // total of fixed widths of all cols PRInt32 numPerCols = 0; // number of colums that have percentage constraints nscoord fixDesTotal = 0; // total of fix or des widths of cols nscoord fixDesTotalNoPct = 0; // total of fix or des widths of cols without pct @@ -1435,8 +1432,8 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow for (rowX = 0; (rowX < numRows) && !done; rowX++) { PRBool originates; PRInt32 colSpan; - nsTableCellFrame* cellFrame = mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan); - if (!originates || (1 == colSpan)) { + mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan); + if (!originates || 1 == colSpan) { continue; } // determine if the cell spans cols which have a pct value @@ -1599,7 +1596,6 @@ void BasicTableLayoutStrategy::CalculateTotals(PRInt32* aTotalCounts, aTotalWidths[FIX] += PR_MAX(fix, minCol); aDupedWidths[FIX] += minCol; } - nscoord desCon = colFrame->GetWidth(DES_CON); if (fixAdj > 0) { if (fixAdj > fix) { aTotalCounts[FIX_ADJ]++; diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index 4d1f7574bd1a..6093c0be8d04 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -2276,7 +2276,6 @@ nsTableFrame::AppendFrames(nsIPresContext* aPresContext, // Append the new col group frame mColGroups.AppendFrame(nsnull, f); } else if (IsRowGroup(display->mDisplay)) { - nsIFrame* prevSibling = mFrames.LastChild(); // Append the new row group frame to the sibling chain mFrames.AppendFrame(nsnull, f); @@ -2340,7 +2339,6 @@ nsTableFrame::InsertFrames(nsIPresContext* aPresContext, SetNeedStrategyInit(PR_TRUE); } else if (IsRowGroup(display->mDisplay)) { // get the starting row index of the new rows and insert them into the table - PRInt32 rowIndex = 0; nsTableRowGroupFrame* prevRowGroup = (nsTableRowGroupFrame *)nsTableFrame::GetFrameAtOrBefore(aPresContext, this, aPrevFrame, nsLayoutAtoms::tableRowGroupFrame); nsFrameList newList(aFrameList); nsIFrame* lastSibling = newList.LastChild(); diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index cb2453d93755..55b2503ec580 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -299,7 +299,6 @@ nsTableRowFrame::DidResize(nsIPresContext* aPresContext, nsTableFrame* tableFrame; nsTableFrame::GetTableFrame(this, tableFrame); if (!tableFrame) return; - nscoord cellSpacingY = tableFrame->GetCellSpacingY(); nsTableIterator iter(aPresContext, *this, eTableDIR); nsIFrame* childFrame = iter.First(); @@ -417,7 +416,6 @@ nsTableRowFrame::CalcTallestCell() nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame); if (NS_FAILED(rv)) return; - nscoord cellSpacingX = tableFrame->GetCellSpacingX(); ResetTallestCell(0); for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame->GetNextSibling(&kidFrame)) { @@ -435,6 +433,7 @@ nsTableRowFrame::CalcTallestCell() } } +#if 0 static PRBool IsFirstRow(nsIPresContext* aPresContext, nsTableFrame& aTable, @@ -451,7 +450,7 @@ PRBool IsFirstRow(nsIPresContext* aPresContext, } return PR_FALSE; } - +#endif NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/layout/html/table/src/nsTableRowGroupFrame.cpp b/layout/html/table/src/nsTableRowGroupFrame.cpp index a796c6299f65..747013091913 100644 --- a/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -642,7 +642,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext, // iterate every row starting at last row spanned and up to the row with // the spanning cell. do this bottom up so that special rows can get a full // allocation before other rows. - PRInt32 startRowIndex = rowIndex + rowSpan - 1; + startRowIndex = rowIndex + rowSpan - 1; for (PRInt32 rowX = startRowIndex; (rowX >= rowIndex) && (excessAvail > 0); rowX--) { nscoord excessForRow = 0; // special rows gets as much as they can diff --git a/layout/svg/base/src/nsPolygonFrame.cpp b/layout/svg/base/src/nsPolygonFrame.cpp index 2878d586f1fe..b6c9c1b0588c 100644 --- a/layout/svg/base/src/nsPolygonFrame.cpp +++ b/layout/svg/base/src/nsPolygonFrame.cpp @@ -258,7 +258,7 @@ nsPolygonFrame::GetPoints() mNumPnts = mPoints.Count()+1; mPnts = new nsPoint[mNumPnts]; for (cnt=0;cntGetRect(rect); nsCOMPtr svgFrame = do_QueryInterface(child); if (svgFrame) { diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index 000402e9934c..676747995df7 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -746,7 +746,6 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd colFrame->GetWidth(aWidthIndex + NUM_MAJOR_WIDTHS)); colWidth = PR_MAX(colWidth, minWidth); - nscoord numeratorMin = 0; nscoord numeratorPct = 0; nscoord numeratorFix = 0; nscoord numeratorAutoDes = 0; @@ -1039,7 +1038,6 @@ BasicTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre colFrame->SetWidth(MIN_PRO, colFrame->GetMinWidth()); } else if ((rawProp > 0) && (rawPropTotal > 0)) { - nscoord desWidth = colFrame->GetDesWidth(); nscoord propWidth = NSToCoordRound( ((float)maxPropTotal) * ((float)rawProp) / (float)rawPropTotal ) ; propWidth = nsTableFrame::RoundToPixel(propWidth, aPixelToTwips); colFrame->SetWidth(MIN_PRO, PR_MAX(propWidth, colFrame->GetMinWidth())); @@ -1329,7 +1327,6 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow } // end for (colX .. float perTotal = 0.0f; // total of percentage constrained cols and/or cells in cols - nscoord fixWidthTotal = 0; // total of fixed widths of all cols PRInt32 numPerCols = 0; // number of colums that have percentage constraints nscoord fixDesTotal = 0; // total of fix or des widths of cols nscoord fixDesTotalNoPct = 0; // total of fix or des widths of cols without pct @@ -1435,8 +1432,8 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow for (rowX = 0; (rowX < numRows) && !done; rowX++) { PRBool originates; PRInt32 colSpan; - nsTableCellFrame* cellFrame = mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan); - if (!originates || (1 == colSpan)) { + mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan); + if (!originates || 1 == colSpan) { continue; } // determine if the cell spans cols which have a pct value @@ -1599,7 +1596,6 @@ void BasicTableLayoutStrategy::CalculateTotals(PRInt32* aTotalCounts, aTotalWidths[FIX] += PR_MAX(fix, minCol); aDupedWidths[FIX] += minCol; } - nscoord desCon = colFrame->GetWidth(DES_CON); if (fixAdj > 0) { if (fixAdj > fix) { aTotalCounts[FIX_ADJ]++; diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 4d1f7574bd1a..6093c0be8d04 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -2276,7 +2276,6 @@ nsTableFrame::AppendFrames(nsIPresContext* aPresContext, // Append the new col group frame mColGroups.AppendFrame(nsnull, f); } else if (IsRowGroup(display->mDisplay)) { - nsIFrame* prevSibling = mFrames.LastChild(); // Append the new row group frame to the sibling chain mFrames.AppendFrame(nsnull, f); @@ -2340,7 +2339,6 @@ nsTableFrame::InsertFrames(nsIPresContext* aPresContext, SetNeedStrategyInit(PR_TRUE); } else if (IsRowGroup(display->mDisplay)) { // get the starting row index of the new rows and insert them into the table - PRInt32 rowIndex = 0; nsTableRowGroupFrame* prevRowGroup = (nsTableRowGroupFrame *)nsTableFrame::GetFrameAtOrBefore(aPresContext, this, aPrevFrame, nsLayoutAtoms::tableRowGroupFrame); nsFrameList newList(aFrameList); nsIFrame* lastSibling = newList.LastChild(); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index cb2453d93755..55b2503ec580 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -299,7 +299,6 @@ nsTableRowFrame::DidResize(nsIPresContext* aPresContext, nsTableFrame* tableFrame; nsTableFrame::GetTableFrame(this, tableFrame); if (!tableFrame) return; - nscoord cellSpacingY = tableFrame->GetCellSpacingY(); nsTableIterator iter(aPresContext, *this, eTableDIR); nsIFrame* childFrame = iter.First(); @@ -417,7 +416,6 @@ nsTableRowFrame::CalcTallestCell() nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame); if (NS_FAILED(rv)) return; - nscoord cellSpacingX = tableFrame->GetCellSpacingX(); ResetTallestCell(0); for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame->GetNextSibling(&kidFrame)) { @@ -435,6 +433,7 @@ nsTableRowFrame::CalcTallestCell() } } +#if 0 static PRBool IsFirstRow(nsIPresContext* aPresContext, nsTableFrame& aTable, @@ -451,7 +450,7 @@ PRBool IsFirstRow(nsIPresContext* aPresContext, } return PR_FALSE; } - +#endif NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index a796c6299f65..747013091913 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -642,7 +642,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext, // iterate every row starting at last row spanned and up to the row with // the spanning cell. do this bottom up so that special rows can get a full // allocation before other rows. - PRInt32 startRowIndex = rowIndex + rowSpan - 1; + startRowIndex = rowIndex + rowSpan - 1; for (PRInt32 rowX = startRowIndex; (rowX >= rowIndex) && (excessAvail > 0); rowX--) { nscoord excessForRow = 0; // special rows gets as much as they can diff --git a/layout/xul/base/src/nsBox.cpp b/layout/xul/base/src/nsBox.cpp index ac3e12557e45..8175868f8fa5 100644 --- a/layout/xul/base/src/nsBox.cpp +++ b/layout/xul/base/src/nsBox.cpp @@ -103,14 +103,12 @@ nsBox::ListBox(nsAutoString& aResult) { namedMap->Item(i, getter_AddRefs(attribute)); nsCOMPtr attr(do_QueryInterface(attribute)); - nsAutoString name; attr->GetName(name); nsAutoString value; attr->GetValue(value); AppendAttribute(name, value, aResult); } } - } NS_IMETHODIMP @@ -447,17 +445,15 @@ nsBox::RelayoutDirtyChild(nsBoxLayoutState& aState, nsIBox* aChild) frame->SetFrameState(state); NeedsRecalc(); - nsIBox* parent = nsnull; - GetParentBox(&parent); - if (parent) - return parent->RelayoutDirtyChild(aState, this); - else { - nsIFrame* parent = nsnull; - frame->GetParent(&parent); - nsCOMPtr shell; - aState.GetPresShell(getter_AddRefs(shell)); - return parent->ReflowDirtyChild(shell, frame); - } + nsIBox* parentBox = nsnull; + GetParentBox(&parentBox); + if (parentBox) + return parentBox->RelayoutDirtyChild(aState, this); + nsIFrame* parent = nsnull; + frame->GetParent(&parent); + nsCOMPtr shell; + aState.GetPresShell(getter_AddRefs(shell)); + return parent->ReflowDirtyChild(shell, frame); } else { #ifdef DEBUG_COELESCED Coelesced(); diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index d2f43984d355..d1b2aefc1dce 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -1272,8 +1272,9 @@ nsBoxFrame::Paint(nsIPresContext* aPresContext, nsFramePaintLayer aWhichLayer) { - const nsStyleDisplay* disp = (const nsStyleDisplay*) - mStyleContext->GetStyleData(eStyleStruct_Display); + const nsStyleDisplay* disp = + NS_STATIC_CAST(const nsStyleDisplay*, + mStyleContext->GetStyleData(eStyleStruct_Display)); // if collapsed nothing is drawn if (disp->mVisible == NS_STYLE_VISIBILITY_COLLAPSE) @@ -1283,8 +1284,6 @@ nsBoxFrame::Paint(nsIPresContext* aPresContext, return NS_OK; } if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) { - const nsStyleDisplay* disp = (const nsStyleDisplay*) - mStyleContext->GetStyleData(eStyleStruct_Display); if (disp->IsVisible() && mRect.width && mRect.height) { // Paint our background and border PRIntn skipSides = GetSkipSides(); diff --git a/layout/xul/base/src/nsBoxToBlockAdaptor.cpp b/layout/xul/base/src/nsBoxToBlockAdaptor.cpp index ad0b03491f21..129183b0ddee 100644 --- a/layout/xul/base/src/nsBoxToBlockAdaptor.cpp +++ b/layout/xul/base/src/nsBoxToBlockAdaptor.cpp @@ -944,7 +944,7 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState, } if (redrawAfterReflow) { - nsIFrame* frame = nsnull; + frame = nsnull; GetFrame(&frame); nsRect r; frame->GetRect(r); @@ -959,8 +959,6 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState, changedSize = PR_TRUE; nsContainerFrame::FinishReflowChild(mFrame, aPresContext, aDesiredSize, aX, aY, NS_FRAME_NO_MOVE_FRAME); - - } #ifdef DEBUG_REFLOW diff --git a/layout/xul/base/src/nsBulletinBoardLayout.cpp b/layout/xul/base/src/nsBulletinBoardLayout.cpp index 8deeeb9f2845..672e05414913 100644 --- a/layout/xul/base/src/nsBulletinBoardLayout.cpp +++ b/layout/xul/base/src/nsBulletinBoardLayout.cpp @@ -235,8 +235,6 @@ nsBulletinBoardLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) nsIBox* child = nsnull; aBox->GetChildBox(&child); - nsRect damageRect; - PRBool damageRectSet = PR_FALSE; while (child) { diff --git a/layout/xul/base/src/nsSplitterFrame.cpp b/layout/xul/base/src/nsSplitterFrame.cpp index 927f0ad2a62c..e705855e0f7c 100644 --- a/layout/xul/base/src/nsSplitterFrame.cpp +++ b/layout/xul/base/src/nsSplitterFrame.cpp @@ -862,7 +862,6 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent) nsIFrame* childFrame = nsnull; childBox->GetFrame(&childFrame); - nsCOMPtr content; childFrame->GetContent(getter_AddRefs(content)); nsCOMPtr atom; nsresult rv; diff --git a/layout/xul/base/src/nsSprocketLayout.cpp b/layout/xul/base/src/nsSprocketLayout.cpp index 01ca634535fe..461ed8a6e764 100644 --- a/layout/xul/base/src/nsSprocketLayout.cpp +++ b/layout/xul/base/src/nsSprocketLayout.cpp @@ -380,7 +380,6 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) PRBool possibleRedraw = PR_FALSE; if (sizeChanged) { - nsSize maxSize; child->GetMaxSize(aState, maxSize); // make sure the size is in our max size. @@ -1146,7 +1145,6 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, // ---- once we have removed and min and max issues just stretch us out in the remaining space // ---- or shrink us. Depends on the size remaining and the spring constants - nscoord oldsize = aGivenSize; aGivenSize = 0; boxSizes = aBoxSizes; computedBoxSizes = aComputedBoxSizes; diff --git a/layout/xul/base/src/nsTempleLayout.cpp b/layout/xul/base/src/nsTempleLayout.cpp index 936c978e5aac..3800b8679db6 100644 --- a/layout/xul/base/src/nsTempleLayout.cpp +++ b/layout/xul/base/src/nsTempleLayout.cpp @@ -231,7 +231,6 @@ nsTempleLayout::DesecrateMonuments(nsIBox* aBox, nsBoxLayoutState& aState) parent->DesecrateMonuments(parentBox, aState); if (mMonuments) { - nsBoxSizeList* tmp = mMonuments; mMonuments->Destroy(aState); mMonuments = nsnull; } diff --git a/layout/xul/base/src/nsTreeItemDragCapturer.cpp b/layout/xul/base/src/nsTreeItemDragCapturer.cpp index 1a0f47f08abf..9df4c0c4dda0 100644 --- a/layout/xul/base/src/nsTreeItemDragCapturer.cpp +++ b/layout/xul/base/src/nsTreeItemDragCapturer.cpp @@ -204,7 +204,6 @@ nsTreeItemDragCapturer :: ConvertEventCoordsToRowCoords ( nsIDOMEvent* inDragEve mouseEvent->GetClientY(&y); float p2t; mPresContext->GetScaledPixelsToTwips(&p2t); - nscoord onePixel = NSIntPixelsToTwips(1, p2t); nscoord xp = NSIntPixelsToTwips(x, p2t); nscoord yp = NSIntPixelsToTwips(y, p2t); diff --git a/layout/xul/base/src/nsTreeLayout.cpp b/layout/xul/base/src/nsTreeLayout.cpp index 5672acb96e92..92d304ffd51d 100644 --- a/layout/xul/base/src/nsTreeLayout.cpp +++ b/layout/xul/base/src/nsTreeLayout.cpp @@ -337,8 +337,6 @@ nsTreeLayout::LazyRowCreator(nsBoxLayoutState& aState, nsXULTreeGroupFrame* aGro return NS_OK; } - nsSize size; - // get the first tree box. If there isn't one create one. PRBool created = PR_FALSE; nsIBox* box = aGroup->GetFirstTreeBox(&created); diff --git a/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp b/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp index 75fca1d86f17..4aac7294c385 100644 --- a/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp +++ b/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp @@ -163,7 +163,6 @@ public: nsScrollSmoother::nsScrollSmoother(nsXULTreeOuterGroupFrame* aOuter) { NS_INIT_REFCNT(); - nsresult rv = NS_OK; mDelta = 0; mOuter = aOuter; } @@ -1322,7 +1321,6 @@ nsXULTreeOuterGroupFrame::ReflowFinished(nsIPresShell* aPresShell, PRBool* aFlus treeLayout->LazyRowCreator(state, this); if (mAdjustScroll) { - PRInt32 pos = mCurrentIndex*mRowHeight; VerticalScroll(mYPosition); mAdjustScroll = PR_FALSE; } diff --git a/mailnews/addrbook/src/nsAbDirectory.cpp b/mailnews/addrbook/src/nsAbDirectory.cpp index 7ac00c51a85a..52978476f3de 100644 --- a/mailnews/addrbook/src/nsAbDirectory.cpp +++ b/mailnews/addrbook/src/nsAbDirectory.cpp @@ -454,7 +454,7 @@ nsresult nsAbDirectory::RemoveCardFromAddressList(const nsIAbCard* card) rv = pAddressLists->Count(&total); for (j = total - 1; j >= 0; j--) { - nsCOMPtr pSupport = getter_AddRefs(pAddressLists->ElementAt(j)); + pSupport = getter_AddRefs(pAddressLists->ElementAt(j)); nsCOMPtr cardInList(do_QueryInterface(pSupport, &rv)); if (card == cardInList.get()) pAddressLists->RemoveElementAt(j); @@ -491,11 +491,10 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards) mDatabase->DeleteCardFromMailList(this, card, PR_TRUE); PRUint32 cardTotal; - PRInt32 i; rv = m_AddressList->Count(&cardTotal); - for (i = cardTotal - 1; i >= 0; i--) + for (PRInt32 k = cardTotal - 1; k >= 0; k--) { - nsCOMPtr pSupport = getter_AddRefs(m_AddressList->ElementAt(i)); + nsCOMPtr pSupport = getter_AddRefs(m_AddressList->ElementAt(k)); if (!pSupport) continue; @@ -508,7 +507,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards) card->GetDbTableID(&cardTableID); card->GetDbRowID(&cardRowID); if (tableID == cardTableID && rowID == cardRowID) - m_AddressList->RemoveElementAt(i); + m_AddressList->RemoveElementAt(k); } } } @@ -525,7 +524,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards) char *listUri = PR_smprintf("%s/MailList%ld", mURI, rowID); if (listUri) { - nsresult rv = NS_OK; + rv = NS_OK; NS_WITH_SERVICE(nsIRDFService, rdfService, kRDFServiceCID, &rv); if(NS_FAILED(rv)) return rv; @@ -671,7 +670,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteDirectory(nsIAbDirectory *directory) } else { //it's a mailing list - nsresult rv = NS_OK; + rv = NS_OK; nsXPIDLCString uri; rv = directory->GetDirUri(getter_Copies(uri)); diff --git a/mailnews/addrbook/src/nsAddressBook.cpp b/mailnews/addrbook/src/nsAddressBook.cpp index 1a274fa874c2..8fc62f839355 100644 --- a/mailnews/addrbook/src/nsAddressBook.cpp +++ b/mailnews/addrbook/src/nsAddressBook.cpp @@ -552,7 +552,6 @@ nsresult AddressBookParser::ParseFile() if (PL_strcmp(fileName, kPersonalAddressbook) == 0) { // This is the personal address book, get name from prefs - nsresult rv = NS_OK; NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv); if (NS_FAILED(rv) || !pPref) return nsnull; diff --git a/mailnews/addrbook/src/nsDirPrefs.cpp b/mailnews/addrbook/src/nsDirPrefs.cpp index 1dc31c75368a..741684c43fec 100644 --- a/mailnews/addrbook/src/nsDirPrefs.cpp +++ b/mailnews/addrbook/src/nsDirPrefs.cpp @@ -2003,7 +2003,7 @@ nsresult DIR_DeleteServerFromList(DIR_Server *server) DIR_SetServerPosition(dirList, server, DIR_POS_DELETE); DIR_DeleteServer(server); - nsresult rv = NS_OK; + rv = NS_OK; NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv); if (NS_FAILED(rv) || !pPref) return NS_ERROR_FAILURE; diff --git a/mailnews/addrbook/src/nsDirectoryDataSource.cpp b/mailnews/addrbook/src/nsDirectoryDataSource.cpp index 42c254fd9331..4d49a39bdd99 100644 --- a/mailnews/addrbook/src/nsDirectoryDataSource.cpp +++ b/mailnews/addrbook/src/nsDirectoryDataSource.cpp @@ -640,7 +640,7 @@ nsresult nsAbDirectoryDataSource::DoDeleteFromDirectory(nsISupportsArray *parent nsCOMPtr parent = do_QueryInterface(supports, &rv); if (NS_SUCCEEDED(rv)) { - nsCOMPtr supports = getter_AddRefs(delDirs->ElementAt(item)); + supports = getter_AddRefs(delDirs->ElementAt(item)); nsCOMPtr deletedDir(do_QueryInterface(supports)); if(deletedDir) { diff --git a/mailnews/base/search/src/nsMsgSearchNews.cpp b/mailnews/base/search/src/nsMsgSearchNews.cpp index 3683aec817f4..40cc6d219933 100644 --- a/mailnews/base/search/src/nsMsgSearchNews.cpp +++ b/mailnews/base/search/src/nsMsgSearchNews.cpp @@ -273,7 +273,6 @@ nsresult nsMsgSearchNews::Encode (nsCString *outEncoding) if (encoding) { PL_strcpy (encoding, "?search"); - PRUint32 numTerms; m_searchTerms->Count(&numTerms); diff --git a/mailnews/base/src/nsMsgPrintEngine.cpp b/mailnews/base/src/nsMsgPrintEngine.cpp index 33fd24cbade5..01be4aae795b 100644 --- a/mailnews/base/src/nsMsgPrintEngine.cpp +++ b/mailnews/base/src/nsMsgPrintEngine.cpp @@ -149,7 +149,7 @@ nsMsgPrintEngine::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIRequest *reque else { // Tell the user we started printing... - PRUnichar *msg = GetString(NS_ConvertASCIItoUCS2("PrintingMessage").GetUnicode()); + msg = GetString(NS_LITERAL_STRING("PrintingMessage").get()); SetStatusMessage( msg ); PR_FREEIF(msg); } diff --git a/mailnews/base/src/nsMsgWindow.cpp b/mailnews/base/src/nsMsgWindow.cpp index 0bc9e145c74c..148c5676c06a 100644 --- a/mailnews/base/src/nsMsgWindow.cpp +++ b/mailnews/base/src/nsMsgWindow.cpp @@ -314,7 +314,7 @@ NS_IMETHODIMP nsMsgWindow::SetDOMWindow(nsIDOMWindowInternal *aWindow) nsAutoString childName; childName.AssignWithConversion("messagepane"); nsCOMPtr rootAsNode(do_QueryInterface(rootAsItem)); - nsCOMPtr docShell(do_QueryInterface(rootAsItem)); + docShell = do_QueryInterface(rootAsItem); mRootDocShellWeak = getter_AddRefs(NS_GetWeakReference(docShell)); // force ourselves to figure out the message pane diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp index 9e27b9b377ac..c3ec716444b1 100644 --- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -3774,9 +3774,7 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetentionSettings(nsIMsgRetentionSettings *msg nsMsgRetainByPreference retainByPreference; PRUint32 daysToKeepHdrs = 0; PRUint32 numHeadersToKeep = 0; - PRUint32 keepUnreadMessagesProp = 0; PRBool keepUnreadMessagesOnly = PR_FALSE; - PRUint32 daysToKeepBodies = 0; msgRetentionSettings->GetRetainByPreference(&retainByPreference); msgRetentionSettings->GetKeepUnreadMessagesOnly(&keepUnreadMessagesOnly); diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index f9bef8986b7b..a60713708110 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -480,7 +480,6 @@ nsImapIncomingServer::LoadNextQueuedUrl(PRBool *aResult) if (aImapUrl) { nsCOMPtr mockChannel; - nsCOMPtr url(do_QueryInterface(aSupport, &rv)); if (NS_SUCCEEDED(aImapUrl->GetMockChannel(getter_AddRefs(mockChannel))) && mockChannel) { diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 62bc2f343267..4be6fb2bda85 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -4484,7 +4484,7 @@ nsresult nsImapMailFolder::GetClearedOriginalOp(nsIMsgOfflineImapOperation *op, { nsMsgKey originalKey; op->GetMessageKey(&originalKey); - nsresult rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp); + rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp); if (NS_SUCCEEDED(rv) && returnOp) { nsXPIDLCString moveDestination; @@ -4532,7 +4532,7 @@ nsresult nsImapMailFolder::GetOriginalOp(nsIMsgOfflineImapOperation *op, nsIMsgO { nsMsgKey originalKey; op->GetMessageKey(&originalKey); - nsresult rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp); + rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp); } } } @@ -4554,7 +4554,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder, NS_ENSURE_ARG(messages); nsresult rv = NS_OK; nsresult stopit = 0; - PRBool operationOnMoveResult = PR_FALSE; nsCOMPtr sourceMailDB; nsCOMPtr srcDbFolderInfo; srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(srcDbFolderInfo), getter_AddRefs(sourceMailDB)); @@ -4589,7 +4588,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder, { // get the highest key in the dest db, so we can make up our fake keys PRBool highWaterDeleted = PR_FALSE; - PRBool haveWarnedUserAboutMoveTargets = PR_FALSE; nsMsgKey fakeBase = 1; nsCOMPtr folderInfo; rv = mDatabase->GetDBFolderInfo(getter_AddRefs(folderInfo)); @@ -4664,7 +4662,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder, { nsXPIDLCString folderURI; GetURI(getter_Copies(folderURI)); - nsOfflineImapOperationType opType = nsIMsgOfflineImapOperation::kMsgCopy; if (isMove) { diff --git a/mailnews/imap/src/nsImapOfflineSync.cpp b/mailnews/imap/src/nsImapOfflineSync.cpp index 510a4ef7f34c..a7205bf67a1c 100644 --- a/mailnews/imap/src/nsImapOfflineSync.cpp +++ b/mailnews/imap/src/nsImapOfflineSync.cpp @@ -234,8 +234,10 @@ nsImapOfflineSync::ProcessAppendMsgOperation(nsIMsgOfflineImapOperation *current nsCOMPtr mailHdr; nsMsgKey msgKey; currentOp->GetMessageKey(&msgKey); +#ifndef NOT_IMPL_YET + m_currentDB->GetMsgHdrForKey(msgKey, getter_AddRefs(mailHdr)); +#else nsresult rv = m_currentDB->GetMsgHdrForKey(msgKey, getter_AddRefs(mailHdr)); -#ifdef NOT_IMPL_YET if (NS_SUCCEEDED(rv) && mailHdr) { char *msg_file_name = WH_TempName (xpFileToPost, "nsmail"); diff --git a/mailnews/imap/src/nsImapUrl.cpp b/mailnews/imap/src/nsImapUrl.cpp index e7e1c960cf22..88e78441f1ef 100644 --- a/mailnews/imap/src/nsImapUrl.cpp +++ b/mailnews/imap/src/nsImapUrl.cpp @@ -364,11 +364,9 @@ NS_IMETHODIMP nsImapUrl::GetImapPartToFetch(char **result) if (wherepart) { char *wherelibmimepart = PL_strstr(wherepart, "&part="); - int len = PL_strlen(m_listOfMessageIds), numCharsToCopy = 0; - if (wherelibmimepart) - numCharsToCopy = (wherelibmimepart - wherepart); - else - numCharsToCopy = PL_strlen(m_listOfMessageIds) - (wherepart - m_listOfMessageIds); + int numCharsToCopy = (wherelibmimepart) ? + wherelibmimepart - wherepart : + PL_strlen(m_listOfMessageIds) - (wherepart - m_listOfMessageIds); if (numCharsToCopy) { *result = (char *) PR_Malloc(sizeof(char) * (numCharsToCopy + 1)); @@ -884,7 +882,6 @@ NS_IMETHODIMP nsImapUrl::AllocateServerPath(const char * canonicalPath, char onl NS_IMETHODIMP nsImapUrl::AllocateCanonicalPath(const char *serverPath, char onlineDelimiter, char **allocatedPath ) { nsresult rv = NS_ERROR_NULL_POINTER; - char *canonicalPath = nsnull; char delimiterToUse = onlineDelimiter; char *serverKey = nsnull; nsString aString; diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp index 4e80e5f805c1..1877e770a788 100644 --- a/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mailnews/local/src/nsLocalMailFolder.cpp @@ -858,7 +858,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Compact(nsIUrlListener *aListener) nsCOMPtr folderInfo; PRUint32 expungedBytes = 0; nsCOMPtr mailDBFactory; - nsresult folderOpen = NS_OK; nsCOMPtr pathSpec; rv = GetExpungedBytes(&expungedBytes); diff --git a/modules/oji/src/lcglue.cpp b/modules/oji/src/lcglue.cpp index 0ae9611c7876..714d74d2ef62 100644 --- a/modules/oji/src/lcglue.cpp +++ b/modules/oji/src/lcglue.cpp @@ -353,7 +353,7 @@ get_JSPrincipals_from_java_caller_impl(JNIEnv *pJNIEnv, JSContext *pJSContext, v } static jobject PR_CALLBACK -get_java_wrapper_impl(JNIEnv *pJNIEnv, jint jsobject) +get_java_wrapper_impl(JNIEnv *pJNIEnv, jint a_jsobject) { nsresult err = NS_OK; jobject pJSObjectWrapper = NULL; @@ -361,7 +361,7 @@ get_java_wrapper_impl(JNIEnv *pJNIEnv, jint jsobject) if (pJVMMgr != NULL) { nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin(); if (pJVMPI != NULL) { - err = pJVMPI->GetJavaWrapper(pJNIEnv, jsobject, &pJSObjectWrapper); + err = pJVMPI->GetJavaWrapper(pJNIEnv, a_jsobject, &pJSObjectWrapper); //pJVMPI->Release(); } pJVMMgr->Release(); @@ -421,8 +421,6 @@ enter_js_from_java_impl(JNIEnv *jEnv, char **errp, if (pNSISecurityContext != nsnull) { if (pJSCX) { - JSPrincipals *jsprin = nsnull; - nsCOMPtr scriptContext = (nsIScriptContext*)JS_GetContextPrivate(pJSCX); if (scriptContext) { nsCOMPtr global = scriptContext->GetGlobalObject(); diff --git a/modules/oji/src/nsCSecurityContext.cpp b/modules/oji/src/nsCSecurityContext.cpp index 5208fe6b8213..642c93f04e64 100644 --- a/modules/oji/src/nsCSecurityContext.cpp +++ b/modules/oji/src/nsCSecurityContext.cpp @@ -82,8 +82,6 @@ nsCSecurityContext::QueryInterface(const nsIID& aIID, void** aInstancePtr) NS_METHOD nsCSecurityContext::Implies(const char* target, const char* action, PRBool *bAllowedAccess) { - nsIPrincipal* pIPrincipal = NULL; - if(!bAllowedAccess) { return NS_ERROR_FAILURE; } @@ -124,8 +122,6 @@ nsCSecurityContext::GetOrigin(char* buf, int buflen) // that case we are not done. if (!m_pPrincipal && m_pJSCX ) { - JSPrincipals *jsprin = nsnull; - nsCOMPtr scriptContext = (nsIScriptContext*)JS_GetContextPrivate(m_pJSCX); if (scriptContext) { nsCOMPtr global = scriptContext->GetGlobalObject(); diff --git a/modules/oji/src/nsJVMManager.cpp b/modules/oji/src/nsJVMManager.cpp index 71ab644b39a4..3ad4700715a7 100644 --- a/modules/oji/src/nsJVMManager.cpp +++ b/modules/oji/src/nsJVMManager.cpp @@ -839,7 +839,6 @@ nsJVMManager::IsAllPermissionGranted( PRBool * isGranted) { nsresult rv = NS_OK; - PRBool success = PR_FALSE; nsIPrincipal* pIPrincipal = NULL; @@ -886,15 +885,13 @@ nsJVMManager::IsAppletTrusted( nsIPrincipal** pIPrincipal) { nsresult rv = NS_OK; - PRBool success = PR_FALSE; //-- Get the signature verifier service NS_WITH_SERVICE(nsISignatureVerifier, verifier, SIGNATURE_VERIFIER_CONTRACTID, &rv); if (NS_FAILED(rv)) // No signature verifier available return NS_OK; - - // Get the Script Security Manager. + // Get the Script Security Manager. NS_WITH_SERVICE(nsIScriptSecurityManager, secMan, NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv) diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp index 03def17acaad..96f7cfbcbc47 100644 --- a/uriloader/base/nsURILoader.cpp +++ b/uriloader/base/nsURILoader.cpp @@ -379,7 +379,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports * nsCOMPtr uri; PRBool abortProcess = PR_FALSE; aChannel->GetURI(getter_AddRefs(uri)); - nsCOMPtr contentStreamListener; nsCOMPtr helperAppService (do_GetService(NS_EXTERNALHELPERAPPSERVICE_CONTRACTID)); if (helperAppService) { diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 5f1e6cdb7188..794119d54827 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -211,7 +211,7 @@ NS_IMETHODIMP nsExternalHelperAppService::DoContent(const char *aMimeContentType nsXPIDLCString fileExtension; // (1) Try to find a mime object by looking the mime type - nsresult rv = GetFromMIMEType(aMimeContentType, getter_AddRefs(mimeInfo)); + GetFromMIMEType(aMimeContentType, getter_AddRefs(mimeInfo)); // here's a nifty little trick. If we got a match back for the content type; but the content type is // unknown or octet (both of these are pretty much unhelpful mime objects), then see if the file extension @@ -848,7 +848,6 @@ NS_IMETHODIMP nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupp return request->Cancel(NS_BINDING_ABORTED); // read the data out of the stream and write it to the temp file. - PRUint32 numBytesRead = 0; if (mOutStream && mDataBuffer && count > 0) { PRUint32 numBytesRead = 0; @@ -869,7 +868,6 @@ NS_IMETHODIMP nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupp NS_IMETHODIMP nsExternalAppHandler::OnStopRequest(nsIRequest *request, nsISupports *aCtxt, nsresult aStatus, const PRUnichar * errorMsg) { - nsresult rv = NS_OK; mStopRequestIssued = PR_TRUE; // first, check to see if we've been canceled.... diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index 2161f85b98ee..1dda598d9a9f 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -450,10 +450,11 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition() mViewManager->GetDeviceContext(dx); dx->GetAppUnitsToDevUnits(t2p); NS_RELEASE(dx); - +#if 0 /* You would think that doing a move and resize all in one operation would * be faster but its not. Something is really broken here. So I'm comenting * this out for now + */ // if we moved and resized do it all in one shot if (mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_MOVED && mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_RESIZED) { @@ -483,7 +484,7 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition() return NS_OK; } } - */ +#endif // if we just resized do it if (mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_RESIZED) { @@ -495,7 +496,9 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition() mWindow->GetBounds(bounds); if (bounds.width != width || bounds.height != bounds.height) { +#ifdef DEBUG_evaughan printf("%d) Resize(%d,%d)\n", this, width, height); +#endif mWindow->Resize(width,height, PR_TRUE); } @@ -517,7 +520,9 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition() mWindow->GetBounds(bounds); if (bounds.x != x || bounds.y != y) { +#ifdef DEBUG_evaughan printf("%d) Move(%d,%d)\n", this, x, y); +#endif mWindow->Move(x,y); } diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 5a097d93406a..0939b02c6309 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -2879,7 +2879,6 @@ NS_IMETHODIMP nsViewManager::Display(nsIView* aView, nscoord aX, nscoord aY) } aView->GetBounds(trect); - nscoord x = trect.x, y = trect.y; localcx->Translate(aX, aY); diff --git a/webshell/tests/viewer/nsWebCrawler.cpp b/webshell/tests/viewer/nsWebCrawler.cpp index 9736af8cc85b..495b5bd59a0f 100644 --- a/webshell/tests/viewer/nsWebCrawler.cpp +++ b/webshell/tests/viewer/nsWebCrawler.cpp @@ -884,7 +884,7 @@ nsWebCrawler::LoadNextURL(PRBool aQueueLoad) if ((mMaxPages < 0) || (mMaxPages > 0)) { while (0 != mPendingURLs.Count()) { - nsString* url = (nsString*) mPendingURLs.ElementAt(0); + url = NS_REINTERPRET_CAST(nsString*, mPendingURLs.ElementAt(0)); mPendingURLs.RemoveElementAt(0); if (nsnull != url) { if (OkToLoad(*url)) { diff --git a/xpcom/tests/TestThreads.cpp b/xpcom/tests/TestThreads.cpp index ca4d8fe4c0b4..f6d0f8c8ee4c 100644 --- a/xpcom/tests/TestThreads.cpp +++ b/xpcom/tests/TestThreads.cpp @@ -41,7 +41,7 @@ public: printf("failed to get current thread\n"); return rv; } - printf("running %d on thread %x\n", mNum, thread.get()); + printf("running %d on thread %p\n", mNum, (void *)thread.get()); // if we don't do something slow, we'll never see the other // worker threads run