From b1ccfbf2cb3036ff6038a3d63e009fe20a410dc6 Mon Sep 17 00:00:00 2001 From: "jim_nance%yahoo.com" Date: Thu, 30 Mar 2000 03:21:26 +0000 Subject: [PATCH] Bug 33322 - Fix compiler warnings. Its been on n.p.m.builds for a few days for module owners to comment on. r=troy@netscape.com git-svn-id: svn://10.0.0.236/trunk@64566 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/chrome/src/nsChromeRegistry.cpp | 26 ++++++++++--------- .../html/content/src/nsHTMLBodyElement.cpp | 1 - .../html/style/src/nsCSSDeclaration.cpp | 3 ++- .../content/html/style/src/nsCSSParser.cpp | 4 +++ .../content/html/style/src/nsCSSStruct.cpp | 3 ++- .../xul/document/src/nsXULDocument.cpp | 4 +-- mozilla/dom/src/html/nsJSHTMLFormElement.cpp | 1 - .../dom/src/html/nsJSHTMLSelectElement.cpp | 1 - mozilla/editor/base/nsHTMLEditRules.cpp | 2 -- .../editor/libeditor/html/nsHTMLEditRules.cpp | 2 -- mozilla/extensions/cookie/nsCookie.cpp | 8 +++--- mozilla/extensions/wallet/src/singsign.cpp | 3 +-- mozilla/extensions/wallet/src/wallet.cpp | 6 ++--- mozilla/gfx/src/gtk/nsFontMetricsGTK.h | 2 +- mozilla/gfx/src/gtk/nsGCCache.h | 2 +- mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp | 4 +-- mozilla/gfx/src/nsImageNetContextAsync.cpp | 3 +-- mozilla/htmlparser/src/CNavDTD.cpp | 2 +- .../src/nsHTMLContentSinkStream.cpp | 2 +- mozilla/layout/base/nsCSSFrameConstructor.cpp | 2 +- .../layout/forms/nsComboboxControlFrame.cpp | 2 -- mozilla/layout/generic/nsBlockFrame.cpp | 9 +++---- mozilla/layout/generic/nsBlockReflowState.cpp | 9 +++---- mozilla/layout/generic/nsBlockReflowState.h | 9 +++---- mozilla/layout/generic/nsFrame.cpp | 1 - mozilla/layout/generic/nsFrameSetFrame.cpp | 3 --- mozilla/layout/generic/nsGfxScrollFrame.cpp | 4 +-- mozilla/layout/generic/nsTextFrame.cpp | 6 +++-- mozilla/layout/html/base/src/nsBlockFrame.cpp | 9 +++---- .../html/base/src/nsBlockReflowState.cpp | 9 +++---- .../layout/html/base/src/nsBlockReflowState.h | 9 +++---- mozilla/layout/html/base/src/nsFrame.cpp | 1 - .../layout/html/base/src/nsGfxScrollFrame.cpp | 4 +-- mozilla/layout/html/base/src/nsTextFrame.cpp | 6 +++-- .../html/content/src/nsHTMLBodyElement.cpp | 1 - .../html/document/src/nsFrameSetFrame.cpp | 3 --- .../html/forms/src/nsComboboxControlFrame.cpp | 2 -- .../html/style/src/nsCSSDeclaration.cpp | 3 ++- .../html/style/src/nsCSSFrameConstructor.cpp | 2 +- mozilla/layout/html/style/src/nsCSSParser.cpp | 4 +++ mozilla/layout/html/table/src/nsCellMap.cpp | 2 ++ .../html/table/src/nsTableCellFrame.cpp | 6 ----- .../layout/html/table/src/nsTableFrame.cpp | 7 ----- mozilla/layout/style/nsCSSDeclaration.cpp | 3 ++- mozilla/layout/style/nsCSSParser.cpp | 4 +++ mozilla/layout/style/nsCSSStruct.cpp | 3 ++- mozilla/layout/tables/nsCellMap.cpp | 2 ++ mozilla/layout/tables/nsTableCellFrame.cpp | 6 ----- mozilla/layout/tables/nsTableFrame.cpp | 7 ----- .../layout/xul/base/src/nsMenuBarFrame.cpp | 3 ++- mozilla/layout/xul/base/src/nsMenuFrame.cpp | 12 ++++----- .../layout/xul/base/src/nsSplitterFrame.cpp | 1 - mozilla/layout/xul/base/src/nsTreeFrame.cpp | 14 +++++----- .../layout/xul/base/src/nsTreeOuterFrame.cpp | 2 -- .../layout/xul/base/src/nsXULTextFrame.cpp | 2 +- mozilla/mailnews/base/util/nsMsgFolder.cpp | 4 +-- mozilla/modules/oji/src/jvmmgr.cpp | 2 -- mozilla/modules/oji/src/lcglue.cpp | 2 +- mozilla/modules/oji/src/nsJVMManager.cpp | 1 - .../netwerk/base/src/nsSocketTransport.cpp | 10 +++---- .../cache/filecache/nsNetDiskCache.cpp | 10 +++---- .../protocol/http/src/nsHTTPRequest.cpp | 9 ++++--- .../converters/nsHTTPCompressConv.cpp | 8 +++--- mozilla/parser/htmlparser/src/CNavDTD.cpp | 2 +- .../src/nsHTMLContentSinkStream.cpp | 2 +- mozilla/rdf/base/src/nsRDFParserUtils.cpp | 6 ++--- mozilla/rdf/chrome/src/nsChromeRegistry.cpp | 26 ++++++++++--------- mozilla/rdf/content/src/nsXULDocument.cpp | 4 +-- mozilla/uriloader/base/nsURILoader.cpp | 6 ++--- mozilla/xpcom/ds/nsTextFormatter.cpp | 2 +- mozilla/xpcom/proxy/src/nsProxyEvent.cpp | 3 --- .../src/nsLoggingProgressNotifier.cpp | 2 +- 72 files changed, 159 insertions(+), 191 deletions(-) diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index 35a51c02a69..9ef2cefd038 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -1243,18 +1243,20 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCAutoString& aProviderTy installContainer->Init(installSource, resource); } - // Put all our elements into the install container. - nsCOMPtr seqKids; - container->GetElements(getter_AddRefs(seqKids)); - PRBool moreKids; - seqKids->HasMoreElements(&moreKids); - while (moreKids) { - nsCOMPtr supp; - seqKids->GetNext(getter_AddRefs(supp)); - nsCOMPtr kid = do_QueryInterface(supp); - installContainer->AppendElement(kid); - seqKids->HasMoreElements(&moreKids); - } + { // Restrict variable scope + // Put all our elements into the install container. + nsCOMPtr seqKids; + container->GetElements(getter_AddRefs(seqKids)); + PRBool moreKids; + seqKids->HasMoreElements(&moreKids); + while (moreKids) { + nsCOMPtr supp; + seqKids->GetNext(getter_AddRefs(supp)); + nsCOMPtr kid = do_QueryInterface(supp); + installContainer->AppendElement(kid); + seqKids->HasMoreElements(&moreKids); + } + } // See if we're a packages seq. If so, we need to set up the baseURL and // the package arcs. diff --git a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp index 5c9385e7c59..ae83f23cbf2 100644 --- a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp @@ -335,7 +335,6 @@ BodyRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresCo aPresContext->GetCompatibilityMode(&mode); nsCOMPtr docShell(do_QueryInterface(container)); if (docShell) { - nscoord pixel = NSIntPixelsToTwips(1, p2t); nscoord frameMarginWidth=-1; // default value nscoord frameMarginHeight=-1; // default value docShell->GetMarginWidth(&frameMarginWidth); // -1 indicates not set diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index c08f2aa4746..9025de4e49d 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -380,10 +380,11 @@ nsCSSMargin::nsCSSMargin(void) nsCSSMargin::nsCSSMargin(const nsCSSMargin& aCopy) : mMargin(nsnull), mPadding(nsnull), - mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineRadius(nsnull), + mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineWidth(aCopy.mOutlineWidth), mOutlineColor(aCopy.mOutlineColor), mOutlineStyle(aCopy.mOutlineStyle), + mOutlineRadius(nsnull), mFloatEdge(aCopy.mFloatEdge) { CSS_IF_COPY(mMargin, nsCSSRect); diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index e1596456c0b..bb71eb02940 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -1900,6 +1900,10 @@ PRBool CSSParserImpl::ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue) str.Append(tk->mIdent); } break; + default: + // There is a whole bunch of cases that are + // not handled by this switch. Ignore them. + break; } if (NS_HexToRGB(str, &rgba)) { aValue.SetColorValue(rgba); diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index c08f2aa4746..9025de4e49d 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -380,10 +380,11 @@ nsCSSMargin::nsCSSMargin(void) nsCSSMargin::nsCSSMargin(const nsCSSMargin& aCopy) : mMargin(nsnull), mPadding(nsnull), - mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineRadius(nsnull), + mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineWidth(aCopy.mOutlineWidth), mOutlineColor(aCopy.mOutlineColor), mOutlineStyle(aCopy.mOutlineStyle), + mOutlineRadius(nsnull), mFloatEdge(aCopy.mFloatEdge) { CSS_IF_COPY(mMargin, nsCSSRect); diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index d373610bc76..84fa6f1e1cc 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -5286,7 +5286,7 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement) // // rdf:bookmarks rdf:history http://foo.bar.com/blah.cgi?baz=9 // - PRInt32 first = 0; + PRUint32 first = 0; while(1) { while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first))) @@ -5295,7 +5295,7 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement) if (first >= datasources.Length()) break; - PRInt32 last = first; + PRUint32 last = first; while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last))) ++last; diff --git a/mozilla/dom/src/html/nsJSHTMLFormElement.cpp b/mozilla/dom/src/html/nsJSHTMLFormElement.cpp index ad7e28d7ddf..878dd1d0e74 100644 --- a/mozilla/dom/src/html/nsJSHTMLFormElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLFormElement.cpp @@ -206,7 +206,6 @@ GetHTMLFormElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) nsIDOMElement* prop; nsIDOMNSHTMLFormElement* b; if (NS_OK == a->QueryInterface(kINSHTMLFormElementIID, (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/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp b/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp index db67c760cd3..4919386af10 100644 --- a/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp +++ b/mozilla/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/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp index ab0c218da47..5eda511cffe 100644 --- a/mozilla/editor/base/nsHTMLEditRules.cpp +++ b/mozilla/editor/base/nsHTMLEditRules.cpp @@ -354,8 +354,6 @@ nsHTMLEditRules::WillInsertText(PRInt32 aAction, nsCOMPtr selNode; PRInt32 selOffset; - char specialChars[] = {'\t','\n',0}; - // if the selection isn't collapsed, delete it. PRBool bCollapsed; res = aSelection->GetIsCollapsed(&bCollapsed); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index ab0c218da47..5eda511cffe 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -354,8 +354,6 @@ nsHTMLEditRules::WillInsertText(PRInt32 aAction, nsCOMPtr selNode; PRInt32 selOffset; - char specialChars[] = {'\t','\n',0}; - // if the selection isn't collapsed, delete it. PRBool bCollapsed; res = aSelection->GetIsCollapsed(&bCollapsed); diff --git a/mozilla/extensions/cookie/nsCookie.cpp b/mozilla/extensions/cookie/nsCookie.cpp index 1e75ec3c416..4e58bff7f41 100644 --- a/mozilla/extensions/cookie/nsCookie.cpp +++ b/mozilla/extensions/cookie/nsCookie.cpp @@ -1591,13 +1591,12 @@ PRIVATE void cookie_SetCookieString(char * curURL, char * setCookieHeader, time_t timeToExpire) { cookie_CookieStruct * prev_cookie; char *path_from_header=NULL, *host_from_header=NULL; - char *host_from_header2=NULL; char *name_from_header=NULL, *cookie_from_header=NULL; time_t expires=0; char *cur_path = cookie_ParseURL(curURL, GET_PATH_PART); char *cur_host = cookie_ParseURL(curURL, GET_HOST_PART); char *semi_colon, *ptr, *equal; - PRBool xxx=PR_FALSE, isDomain=PR_FALSE, acceptIt=PR_FALSE; + PRBool xxx=PR_FALSE, isDomain=PR_FALSE; PRBool bCookieAdded; PRBool pref_scd = PR_FALSE; @@ -2187,7 +2186,7 @@ permission_Load() { permissionIndex = nextPermissionIndex; PRInt32 type = 0; - PRInt32 index = 0; + PRUint32 index = 0; if (permissionString.IsEmpty()) { continue; /* empty permission entry -- should never happen */ @@ -2212,8 +2211,7 @@ permission_Load() { } } else { if (!permissionString.IsEmpty()) { - nsresult rv = - permission_Add(host.ToNewCString(), permission, type, PR_FALSE); + rv = permission_Add(host.ToNewCString(), permission, type, PR_FALSE); if (NS_FAILED(rv)) { permission_UnlockList(); strm.close(); diff --git a/mozilla/extensions/wallet/src/singsign.cpp b/mozilla/extensions/wallet/src/singsign.cpp index 0d41edf9df6..3b8fd99064a 100644 --- a/mozilla/extensions/wallet/src/singsign.cpp +++ b/mozilla/extensions/wallet/src/singsign.cpp @@ -1870,7 +1870,6 @@ SI_LoadSignonData(PRBool fullLoad) { PRBool isPassword; if (buffer.CharAt(0) == '*') { isPassword = PR_TRUE; - nsAutoString temp; buffer.Mid(name, 1, buffer.Length()-1); ret = si_ReadLine(strmu, strmp, buffer, fullLoad, saveCountP, &readCount); } else { @@ -1943,7 +1942,7 @@ si_WriteLine(nsOutputFileStream strmu, nsOutputFileStream strmp, nsAutoString lineBuffer, PRBool obscure, PRBool fullSave, nsKeyType saveCount = 0, nsKeyType *writeCount = 0, PRBool inHeader = PR_FALSE) { - for (int i=0; i #include diff --git a/mozilla/gfx/src/gtk/nsGCCache.h b/mozilla/gfx/src/gtk/nsGCCache.h index 0e0f0191660..6e8fa533033 100644 --- a/mozilla/gfx/src/gtk/nsGCCache.h +++ b/mozilla/gfx/src/gtk/nsGCCache.h @@ -27,7 +27,7 @@ #ifndef nsGCCache_h___ #define nsGCCache_h___ -#define countof(x) (sizeof(x) / sizeof (*x)) +#define countof(x) ((int)(sizeof(x) / sizeof (*x))) struct GCData { diff --git a/mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp b/mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp index c978232d67d..9febd62183c 100644 --- a/mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp +++ b/mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp @@ -25,17 +25,17 @@ #include "nsCOMPtr.h" #include "nsGfxCIID.h" +#include "nsBlender.h" #include "nsFontMetricsGTK.h" -#include "nsDeviceContextGTK.h" #include "nsRenderingContextGTK.h" // aka nsDeviceContextSpecGTK.h #include "nsDeviceContextSpecG.h" // aka nsDeviceContextSpecFactoryGTK.h #include "nsDeviceContextSpecFactoryG.h" #include "nsScreenManagerGtk.h" -#include "nsBlender.h" #include "nsScriptableRegion.h" #include "nsIImageManager.h" +#include "nsDeviceContextGTK.h" // objects that just require generic constructors diff --git a/mozilla/gfx/src/nsImageNetContextAsync.cpp b/mozilla/gfx/src/nsImageNetContextAsync.cpp index cc2a2699861..880ba84e318 100644 --- a/mozilla/gfx/src/nsImageNetContextAsync.cpp +++ b/mozilla/gfx/src/nsImageNetContextAsync.cpp @@ -723,8 +723,7 @@ ImageNetContextImpl::GetURL (ilIURL * aURL, } } - PRBool bIsBackground = aURL->GetBackgroundLoad(); - if (bIsBackground) { + if (aURL->GetBackgroundLoad()) { (void)channel->SetLoadAttributes(nsIChannel::LOAD_BACKGROUND); } diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp index 133ce8fb3d0..829a5995038 100644 --- a/mozilla/htmlparser/src/CNavDTD.cpp +++ b/mozilla/htmlparser/src/CNavDTD.cpp @@ -1709,7 +1709,7 @@ nsresult CNavDTD::HandleSavedTokens(PRInt32 anIndex) { PRInt32 attrCount; PRInt32 theTopIndex = anIndex + 1; PRInt32 theTagCount = mBodyContext->GetCount(); - eHTMLTags theParentTag= mBodyContext->TagAt(anIndex); + //eHTMLTags theParentTag= mBodyContext->TagAt(anIndex); //XXX In the content sink, FORM behaves as a container for parents //other than eHTMLTag_table,eHTMLTag_tbody,eHTMLTag_tr,eHTMLTag_col, diff --git a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp index fbd5a5e7b21..3ee154f932e 100644 --- a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -1011,7 +1011,7 @@ nsHTMLContentSinkStream::AddLeaf(const nsIParserNode& aNode){ // and we'd better rewrap the whole text node. PRBool nsHTMLContentSinkStream::HasLongLines(const nsString& text) { - const PRInt32 longLineLen = 128; + const PRUint32 longLineLen = 128; nsString str = text; PRUint32 start=0; PRUint32 theLen=text.Length(); diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index d7647f0c1b5..68beb9b6c61 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4550,7 +4550,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, nsFrameItems& aFrameItems, PRBool aXBLBaseTag, PRBool& aHaltProcessing) -{ +{ PRBool primaryFrameSet = PR_FALSE; PRBool processChildren = PR_FALSE; // whether we should process child content nsresult rv = NS_OK; diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index eba3aa7f31b..71ba1e68112 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -933,7 +933,6 @@ nsComboboxControlFrame::ReflowCombobox(nsIPresContext * aPresContext, // now we need to adjust layout, because the AreaFrame // doesn't position things exactly where we want them - nscoord insideWidth = dispWidth; nscoord insideHeight = aDesiredSize.height - aBorderPadding.top - aBorderPadding.bottom; // the gets for the Display "block" frame and for the button @@ -2285,7 +2284,6 @@ nsComboboxControlFrame::Paint(nsIPresContext* aPresContext, nsAreaFrame::Paint(aPresContext,aRenderingContext,aDirtyRect,aWhichLayer); if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) { - //nsRect rect(0, 0, mRect.width, mRect.height); if (mDisplayFrame) { aRenderingContext.PushState(); PRBool clipEmpty; diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index cb51399d138..aaca070c5cb 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -821,7 +821,6 @@ nsFrame::GetDataForTableSelection(nsMouseEvent *aMouseEvent, nsIContent **aParen nsresult result = NS_OK; PRBool foundCell = PR_FALSE; PRBool foundTable = PR_FALSE; - nsRect rect; while (frame && NS_SUCCEEDED(result)) { diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index 20d41b1e31e..ed8ca973945 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -55,9 +55,6 @@ #define ALL_VIS 0x000F #define NONE_VIS 0x0000 -static PRInt32 LEFT_EDGE = -1; -static PRInt32 RIGHT_EDGE = 1000000; - static NS_DEFINE_IID(kIFramesetFrameIID, NS_IFRAMESETFRAME_IID); static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID); static NS_DEFINE_IID(kILookAndFeelIID, NS_ILOOKANDFEEL_IID); diff --git a/mozilla/layout/generic/nsGfxScrollFrame.cpp b/mozilla/layout/generic/nsGfxScrollFrame.cpp index 9150b7950a1..5c46f9f2ce6 100644 --- a/mozilla/layout/generic/nsGfxScrollFrame.cpp +++ b/mozilla/layout/generic/nsGfxScrollFrame.cpp @@ -777,9 +777,9 @@ nsGfxScrollFrame::QueryInterface(REFNSIID aIID, void** aInstancePtr) nsGfxScrollFrameInner::nsGfxScrollFrameInner(nsGfxScrollFrame* aOuter):mHScrollbarFrame(nsnull), mVScrollbarFrame(nsnull), mScrollAreaFrame(nsnull), + mOnePixel(20), mHasVerticalScrollbar(PR_FALSE), - mHasHorizontalScrollbar(PR_FALSE), - mOnePixel(20) + mHasHorizontalScrollbar(PR_FALSE) { NS_INIT_REFCNT(); mOuter = aOuter; diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 8a8d60c5268..5a44e9645f8 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -2196,11 +2196,13 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, nsFrameState frameState; GetFrameState(&frameState); +#if 0 PRBool isSelected = ((frameState & NS_FRAME_SELECTED_CONTENT) == NS_FRAME_SELECTED_CONTENT); - /*if (!aSelected && !isSelected) //already set thanks + if (!aSelected && !isSelected) //already set thanks { return NS_OK; - }*/ + } +#endif // check whether style allows selection const nsStyleUserInterface* userinterface; diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index fd976566eb7..20671f3dae6 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -574,14 +574,14 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, : mBlock(aFrame), mPresContext(aPresContext), mReflowState(aReflowState), + mNeedResizeReflow(PR_FALSE), + mIsInlineIncrReflow(PR_FALSE), mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE), mNextRCFrame(nsnull), mPrevBottomMargin(0), - mLineNumber(0), - mNeedResizeReflow(PR_FALSE), - mIsInlineIncrReflow(PR_FALSE) + mLineNumber(0) { const nsMargin& borderPadding = BorderPadding(); @@ -1647,8 +1647,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext, shell->GetFrameManager(getter_AddRefs(frameManager)); if (frameManager) { nsHTMLReflowState& reflowState = (nsHTMLReflowState&)aReflowState; - nsISpaceManager *spaceManager = reflowState.mSpaceManager; - NS_ADDREF(spaceManager); + NS_ADDREF(reflowState.mSpaceManager); rv = frameManager->SetFrameProperty(this, nsLayoutAtoms::spaceManagerProperty, reflowState.mSpaceManager, nsnull /* should be nsSpaceManagerDestroyer*/); } diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index cb51399d138..aaca070c5cb 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -821,7 +821,6 @@ nsFrame::GetDataForTableSelection(nsMouseEvent *aMouseEvent, nsIContent **aParen nsresult result = NS_OK; PRBool foundCell = PR_FALSE; PRBool foundTable = PR_FALSE; - nsRect rect; while (frame && NS_SUCCEEDED(result)) { diff --git a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp index 9150b7950a1..5c46f9f2ce6 100644 --- a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp @@ -777,9 +777,9 @@ nsGfxScrollFrame::QueryInterface(REFNSIID aIID, void** aInstancePtr) nsGfxScrollFrameInner::nsGfxScrollFrameInner(nsGfxScrollFrame* aOuter):mHScrollbarFrame(nsnull), mVScrollbarFrame(nsnull), mScrollAreaFrame(nsnull), + mOnePixel(20), mHasVerticalScrollbar(PR_FALSE), - mHasHorizontalScrollbar(PR_FALSE), - mOnePixel(20) + mHasHorizontalScrollbar(PR_FALSE) { NS_INIT_REFCNT(); mOuter = aOuter; diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 8a8d60c5268..5a44e9645f8 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -2196,11 +2196,13 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext, nsFrameState frameState; GetFrameState(&frameState); +#if 0 PRBool isSelected = ((frameState & NS_FRAME_SELECTED_CONTENT) == NS_FRAME_SELECTED_CONTENT); - /*if (!aSelected && !isSelected) //already set thanks + if (!aSelected && !isSelected) //already set thanks { return NS_OK; - }*/ + } +#endif // check whether style allows selection const nsStyleUserInterface* userinterface; diff --git a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp index 5c9385e7c59..ae83f23cbf2 100644 --- a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp @@ -335,7 +335,6 @@ BodyRule::MapStyleInto(nsIMutableStyleContext* aContext, nsIPresContext* aPresCo aPresContext->GetCompatibilityMode(&mode); nsCOMPtr docShell(do_QueryInterface(container)); if (docShell) { - nscoord pixel = NSIntPixelsToTwips(1, p2t); nscoord frameMarginWidth=-1; // default value nscoord frameMarginHeight=-1; // default value docShell->GetMarginWidth(&frameMarginWidth); // -1 indicates not set diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index 20d41b1e31e..ed8ca973945 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -55,9 +55,6 @@ #define ALL_VIS 0x000F #define NONE_VIS 0x0000 -static PRInt32 LEFT_EDGE = -1; -static PRInt32 RIGHT_EDGE = 1000000; - static NS_DEFINE_IID(kIFramesetFrameIID, NS_IFRAMESETFRAME_IID); static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID); static NS_DEFINE_IID(kILookAndFeelIID, NS_ILOOKANDFEEL_IID); diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index eba3aa7f31b..71ba1e68112 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -933,7 +933,6 @@ nsComboboxControlFrame::ReflowCombobox(nsIPresContext * aPresContext, // now we need to adjust layout, because the AreaFrame // doesn't position things exactly where we want them - nscoord insideWidth = dispWidth; nscoord insideHeight = aDesiredSize.height - aBorderPadding.top - aBorderPadding.bottom; // the gets for the Display "block" frame and for the button @@ -2285,7 +2284,6 @@ nsComboboxControlFrame::Paint(nsIPresContext* aPresContext, nsAreaFrame::Paint(aPresContext,aRenderingContext,aDirtyRect,aWhichLayer); if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) { - //nsRect rect(0, 0, mRect.width, mRect.height); if (mDisplayFrame) { aRenderingContext.PushState(); PRBool clipEmpty; diff --git a/mozilla/layout/html/style/src/nsCSSDeclaration.cpp b/mozilla/layout/html/style/src/nsCSSDeclaration.cpp index c08f2aa4746..9025de4e49d 100644 --- a/mozilla/layout/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/layout/html/style/src/nsCSSDeclaration.cpp @@ -380,10 +380,11 @@ nsCSSMargin::nsCSSMargin(void) nsCSSMargin::nsCSSMargin(const nsCSSMargin& aCopy) : mMargin(nsnull), mPadding(nsnull), - mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineRadius(nsnull), + mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineWidth(aCopy.mOutlineWidth), mOutlineColor(aCopy.mOutlineColor), mOutlineStyle(aCopy.mOutlineStyle), + mOutlineRadius(nsnull), mFloatEdge(aCopy.mFloatEdge) { CSS_IF_COPY(mMargin, nsCSSRect); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index d7647f0c1b5..68beb9b6c61 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -4550,7 +4550,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, nsFrameItems& aFrameItems, PRBool aXBLBaseTag, PRBool& aHaltProcessing) -{ +{ PRBool primaryFrameSet = PR_FALSE; PRBool processChildren = PR_FALSE; // whether we should process child content nsresult rv = NS_OK; diff --git a/mozilla/layout/html/style/src/nsCSSParser.cpp b/mozilla/layout/html/style/src/nsCSSParser.cpp index e1596456c0b..bb71eb02940 100644 --- a/mozilla/layout/html/style/src/nsCSSParser.cpp +++ b/mozilla/layout/html/style/src/nsCSSParser.cpp @@ -1900,6 +1900,10 @@ PRBool CSSParserImpl::ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue) str.Append(tk->mIdent); } break; + default: + // There is a whole bunch of cases that are + // not handled by this switch. Ignore them. + break; } if (NS_HexToRGB(str, &rgba)) { aValue.SetColorValue(rgba); diff --git a/mozilla/layout/html/table/src/nsCellMap.cpp b/mozilla/layout/html/table/src/nsCellMap.cpp index c993a1dc435..4265f73d295 100644 --- a/mozilla/layout/html/table/src/nsCellMap.cpp +++ b/mozilla/layout/html/table/src/nsCellMap.cpp @@ -1457,12 +1457,14 @@ void nsCellMap::RemoveCell(nsTableCellMap& aMap, PRBool isZeroRowSpan; PRInt32 rowSpan = GetRowSpan(aMap, aRowIndex, startColIndex, PR_FALSE, isZeroRowSpan); +#if 0 // A bunch of unused stuff assuming no function call side effects PRInt32 endRowIndex = aRowIndex + rowSpan - 1; PRBool isZeroColSpan; PRInt32 endColIndex = startColIndex + GetEffectiveColSpan(aMap, aRowIndex, startColIndex, isZeroColSpan) - 1; // record whether removing the cells is going to cause complications due // to existing row spans, col spans or table sizing. +#endif PRBool spansCauseRebuild = CellsSpanInOrOut(aMap, aRowIndex, aRowIndex + rowSpan - 1, startColIndex, numCols - 1); diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 7f72843afa5..4f1c30b65b1 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -608,12 +608,6 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, if (NS_UNCONSTRAINEDSIZE==aReflowState.availableWidth) pMaxElementSize = &maxElementSize; - // SEC: what about ascent and decent??? - - // Compute the insets (sum of border and padding) - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); - /* XXX: remove tableFrame when border-collapse inherits */ nsTableFrame* tableFrame=nsnull; rv = nsTableFrame::GetTableFrame(this, tableFrame); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index fdc915598c7..4b1bb0e5b04 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1592,8 +1592,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext* aPresContext, aDesiredSize.width = mRect.width; } else { - nscoord pass1Height = aDesiredSize.height; - // Constrain our reflow width to the computed table width. Note: this is based // on the width of the first-in-flow nsHTMLReflowState reflowState(aReflowState); @@ -3279,8 +3277,6 @@ void nsTableFrame::SetTableWidth(nsIPresContext* aPresContext, } // Compute the insets (sum of border and padding) - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); nsMargin borderPadding; GetTableBorder (borderPadding); // this gets the max border value at every edge borderPadding += aReflowState.mComputedPadding; @@ -3505,9 +3501,6 @@ nscoord nsTableFrame::ComputeDesiredHeight(nsIPresContext* aPresContext ((nsTableRowGroupFrame*)childFrame)->GetHeightOfRows(aPresContext, sumOfRowHeights); } if (!firstRowGroupFrame) { - // the first row group's y position starts inside our padding - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); nsMargin borderPadding = aReflowState.mComputedBorderPadding; rowGroupYPos = borderPadding.top; firstRowGroupFrame = childFrame; diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index c08f2aa4746..9025de4e49d 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -380,10 +380,11 @@ nsCSSMargin::nsCSSMargin(void) nsCSSMargin::nsCSSMargin(const nsCSSMargin& aCopy) : mMargin(nsnull), mPadding(nsnull), - mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineRadius(nsnull), + mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineWidth(aCopy.mOutlineWidth), mOutlineColor(aCopy.mOutlineColor), mOutlineStyle(aCopy.mOutlineStyle), + mOutlineRadius(nsnull), mFloatEdge(aCopy.mFloatEdge) { CSS_IF_COPY(mMargin, nsCSSRect); diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index e1596456c0b..bb71eb02940 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -1900,6 +1900,10 @@ PRBool CSSParserImpl::ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue) str.Append(tk->mIdent); } break; + default: + // There is a whole bunch of cases that are + // not handled by this switch. Ignore them. + break; } if (NS_HexToRGB(str, &rgba)) { aValue.SetColorValue(rgba); diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index c08f2aa4746..9025de4e49d 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -380,10 +380,11 @@ nsCSSMargin::nsCSSMargin(void) nsCSSMargin::nsCSSMargin(const nsCSSMargin& aCopy) : mMargin(nsnull), mPadding(nsnull), - mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineRadius(nsnull), + mBorderWidth(nsnull), mBorderColor(nsnull), mBorderStyle(nsnull), mBorderRadius(nsnull), mOutlineWidth(aCopy.mOutlineWidth), mOutlineColor(aCopy.mOutlineColor), mOutlineStyle(aCopy.mOutlineStyle), + mOutlineRadius(nsnull), mFloatEdge(aCopy.mFloatEdge) { CSS_IF_COPY(mMargin, nsCSSRect); diff --git a/mozilla/layout/tables/nsCellMap.cpp b/mozilla/layout/tables/nsCellMap.cpp index c993a1dc435..4265f73d295 100644 --- a/mozilla/layout/tables/nsCellMap.cpp +++ b/mozilla/layout/tables/nsCellMap.cpp @@ -1457,12 +1457,14 @@ void nsCellMap::RemoveCell(nsTableCellMap& aMap, PRBool isZeroRowSpan; PRInt32 rowSpan = GetRowSpan(aMap, aRowIndex, startColIndex, PR_FALSE, isZeroRowSpan); +#if 0 // A bunch of unused stuff assuming no function call side effects PRInt32 endRowIndex = aRowIndex + rowSpan - 1; PRBool isZeroColSpan; PRInt32 endColIndex = startColIndex + GetEffectiveColSpan(aMap, aRowIndex, startColIndex, isZeroColSpan) - 1; // record whether removing the cells is going to cause complications due // to existing row spans, col spans or table sizing. +#endif PRBool spansCauseRebuild = CellsSpanInOrOut(aMap, aRowIndex, aRowIndex + rowSpan - 1, startColIndex, numCols - 1); diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 7f72843afa5..4f1c30b65b1 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -608,12 +608,6 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, if (NS_UNCONSTRAINEDSIZE==aReflowState.availableWidth) pMaxElementSize = &maxElementSize; - // SEC: what about ascent and decent??? - - // Compute the insets (sum of border and padding) - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); - /* XXX: remove tableFrame when border-collapse inherits */ nsTableFrame* tableFrame=nsnull; rv = nsTableFrame::GetTableFrame(this, tableFrame); diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index fdc915598c7..4b1bb0e5b04 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1592,8 +1592,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext* aPresContext, aDesiredSize.width = mRect.width; } else { - nscoord pass1Height = aDesiredSize.height; - // Constrain our reflow width to the computed table width. Note: this is based // on the width of the first-in-flow nsHTMLReflowState reflowState(aReflowState); @@ -3279,8 +3277,6 @@ void nsTableFrame::SetTableWidth(nsIPresContext* aPresContext, } // Compute the insets (sum of border and padding) - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); nsMargin borderPadding; GetTableBorder (borderPadding); // this gets the max border value at every edge borderPadding += aReflowState.mComputedPadding; @@ -3505,9 +3501,6 @@ nscoord nsTableFrame::ComputeDesiredHeight(nsIPresContext* aPresContext ((nsTableRowGroupFrame*)childFrame)->GetHeightOfRows(aPresContext, sumOfRowHeights); } if (!firstRowGroupFrame) { - // the first row group's y position starts inside our padding - const nsStyleSpacing* spacing = - (const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing); nsMargin borderPadding = aReflowState.mComputedBorderPadding; rowGroupYPos = borderPadding.top; firstRowGroupFrame = childFrame; diff --git a/mozilla/layout/xul/base/src/nsMenuBarFrame.cpp b/mozilla/layout/xul/base/src/nsMenuBarFrame.cpp index c900c472961..920c0e0c974 100644 --- a/mozilla/layout/xul/base/src/nsMenuBarFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuBarFrame.cpp @@ -86,7 +86,8 @@ NS_INTERFACE_MAP_END_INHERITING(nsToolbarFrame) // nsMenuBarFrame cntr // nsMenuBarFrame::nsMenuBarFrame(nsIPresShell* aShell):nsToolbarFrame(aShell), -mIsActive(PR_FALSE), mTarget(nsnull), mKeyboardNavigator(nsnull), mMenuBarListener(nsnull) +mMenuBarListener(nsnull), mKeyboardNavigator(nsnull), +mIsActive(PR_FALSE), mTarget(nsnull) { } // cntr diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 4578aa600e8..ab1a2b017d6 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -737,7 +737,7 @@ nsMenuFrame::Reflow(nsIPresContext* aPresContext, nsRect rect; popupChild->GetRect(rect); - nsresult rv = ReflowChild(popupChild, aPresContext, kidDesiredSize, kidReflowState, + ReflowChild(popupChild, aPresContext, kidDesiredSize, kidReflowState, rect.x, rect.y, NS_FRAME_NO_SIZE_VIEW | NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_MOVE_CHILD_VIEWS, aStatus); // Set the child's width and height to its desired size @@ -764,7 +764,7 @@ nsMenuFrame::Reflow(nsIPresContext* aPresContext, nsRect rect; popupChild->GetRect(rect); - nsresult rv = ReflowChild(popupChild, aPresContext, kidDesiredSize, kidReflowState, + ReflowChild(popupChild, aPresContext, kidDesiredSize, kidReflowState, rect.x, rect.y, NS_FRAME_NO_SIZE_VIEW | NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_MOVE_CHILD_VIEWS, aStatus); @@ -977,10 +977,10 @@ nsMenuFrame::UpdateMenuType(nsIPresContext* aPresContext) else if (value.Equals("radio")) { mType = eMenuType_Radio; - nsAutoString value; - mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::name, value); - if ( mGroupName != value ) - mGroupName = value; + nsAutoString valueName; + mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::name, valueName); + if ( mGroupName != valueName ) + mGroupName = valueName; } else { if (mType != eMenuType_Normal) diff --git a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp index 09bd8dd3590..ea7f5392ef6 100644 --- a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp @@ -947,7 +947,6 @@ nsSplitterFrameInner::AdjustChildren(nsIPresContext* aPresContext, nsSplitterInf { nscoord pref = aChildInfos[i].changed; nsIFrame* childFrame = aChildInfos[i].child; - PRInt32 index = aChildInfos[i].index; nsresult rv; const nsStyleSpacing* spacing; diff --git a/mozilla/layout/xul/base/src/nsTreeFrame.cpp b/mozilla/layout/xul/base/src/nsTreeFrame.cpp index a5c9d3648fa..477ecc546d3 100644 --- a/mozilla/layout/xul/base/src/nsTreeFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeFrame.cpp @@ -403,12 +403,14 @@ nsTreeFrame::Reflow(nsIPresContext* aPresContext, mSlatedForReflow = PR_FALSE; - nsRect rect; - GetRect(rect); - if (rect.width != aReflowState.mComputedWidth && aReflowState.reason == eReflowReason_Resize) { - // We're doing a resize and changing the width of the table. All rows must - // reflow. Reset our generation. - SetUseGeneration(PR_FALSE); + if (aReflowState.reason == eReflowReason_Resize) { + nsRect rect; + GetRect(rect); + if (rect.width != aReflowState.mComputedWidth) { + // We're doing a resize and changing the width of the table. All rows must + // reflow. Reset our generation. + SetUseGeneration(PR_FALSE); + } } if (UseGeneration()) { diff --git a/mozilla/layout/xul/base/src/nsTreeOuterFrame.cpp b/mozilla/layout/xul/base/src/nsTreeOuterFrame.cpp index 5309c44dca8..2319c8d24f5 100644 --- a/mozilla/layout/xul/base/src/nsTreeOuterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeOuterFrame.cpp @@ -121,8 +121,6 @@ nsTreeOuterFrame::Reflow(nsIPresContext* aPresContext, } - PRBool badWidth = PR_FALSE; - if (aReflowState.mComputedWidth == NS_UNCONSTRAINEDSIZE) { NS_WARNING("Inefficient XUL: Reflowing outer tree frame with unconstrained width, try giving it a width in CSS!"); nsHTMLReflowState goodState(aReflowState); diff --git a/mozilla/layout/xul/base/src/nsXULTextFrame.cpp b/mozilla/layout/xul/base/src/nsXULTextFrame.cpp index 51ad54401f7..c32b52506bf 100644 --- a/mozilla/layout/xul/base/src/nsXULTextFrame.cpp +++ b/mozilla/layout/xul/base/src/nsXULTextFrame.cpp @@ -107,7 +107,7 @@ nsXULTextFrame::AttributeChanged(nsIPresContext* aPresContext, return NS_OK; } -nsXULTextFrame::nsXULTextFrame():mTitle(""), mCropType(CropRight),mAccessKeyInfo(nsnull) +nsXULTextFrame::nsXULTextFrame():mCropType(CropRight),mTitle(""), mAccessKeyInfo(nsnull) { mState |= NS_STATE_NEED_LAYOUT; } diff --git a/mozilla/mailnews/base/util/nsMsgFolder.cpp b/mozilla/mailnews/base/util/nsMsgFolder.cpp index 4813920a215..758a596e000 100644 --- a/mozilla/mailnews/base/util/nsMsgFolder.cpp +++ b/mozilla/mailnews/base/util/nsMsgFolder.cpp @@ -74,8 +74,8 @@ nsMsgFolder::nsMsgFolder(void) mHaveParsedURI(PR_FALSE), mIsServerIsValid(PR_FALSE), mIsServer(PR_FALSE), - mDeleteIsMoveToTrash(PR_TRUE), - mBaseMessageURI(nsnull) + mBaseMessageURI(nsnull), + mDeleteIsMoveToTrash(PR_TRUE) { // NS_INIT_REFCNT(); done by superclass diff --git a/mozilla/modules/oji/src/jvmmgr.cpp b/mozilla/modules/oji/src/jvmmgr.cpp index 4ee09171c1f..f098147f725 100644 --- a/mozilla/modules/oji/src/jvmmgr.cpp +++ b/mozilla/modules/oji/src/jvmmgr.cpp @@ -422,7 +422,6 @@ JVM_GetJavaPrincipalsFromStackAsNSVector(JSStackFrame *pCurrentFrame) return NULL; } - JSPrincipals *principals = NULL; JVMContext* context = GetJVMContext(); JSContext *pJSCX = context->js_context; if (pJSCX == NULL) @@ -455,7 +454,6 @@ JVM_GetJavaPrincipalsFromStack(JSStackFrame *pCurrentFrame) return NULL; } - JSPrincipals *principals = NULL; JVMContext* context = GetJVMContext(); JSContext *pJSCX = context->js_context; if (pJSCX == NULL) diff --git a/mozilla/modules/oji/src/lcglue.cpp b/mozilla/modules/oji/src/lcglue.cpp index efcd342e1c0..82300da6e70 100644 --- a/mozilla/modules/oji/src/lcglue.cpp +++ b/mozilla/modules/oji/src/lcglue.cpp @@ -437,7 +437,7 @@ exit_js_impl(JNIEnv *jEnv) static PRBool PR_CALLBACK create_java_vm_impl(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs) { - const char* classpath = (const char*)initargs; // unused (should it be?) + // const char* classpath = (const char*)initargs; *jvm = (SystemJavaVM*)JVM_GetJVMMgr(); // unused in the browser *initialEnv = JVM_GetJNIEnv(); return (*jvm != NULL && *initialEnv != NULL); diff --git a/mozilla/modules/oji/src/nsJVMManager.cpp b/mozilla/modules/oji/src/nsJVMManager.cpp index c97fffeb47a..b461019a91c 100644 --- a/mozilla/modules/oji/src/nsJVMManager.cpp +++ b/mozilla/modules/oji/src/nsJVMManager.cpp @@ -524,7 +524,6 @@ nsJVMManager::StartupJVM(void) */ PR_ASSERT(fJVM == NULL); - nsIPlugin* plugin = NULL; /* **TODO: amusil. Load the plugin by getting into Service manager. ** Right now there is no API to do this stuff. We need to diff --git a/mozilla/netwerk/base/src/nsSocketTransport.cpp b/mozilla/netwerk/base/src/nsSocketTransport.cpp index 90330e38051..99e503ec306 100644 --- a/mozilla/netwerk/base/src/nsSocketTransport.cpp +++ b/mozilla/netwerk/base/src/nsSocketTransport.cpp @@ -136,14 +136,14 @@ nsSocketTransport::nsSocketTransport(): mStatus(NS_OK), mSuspendCount(0), mWriteCount(0), - mWriteBuffer(nsnull), - mWriteBufferIndex(0), - mWriteBufferLength(0), mBytesExpected(-1), mReuseCount(0), mLastReuseCount(0), - mBufferSegmentSize(0), - mBufferMaxSize(0) + mWriteBuffer(nsnull), + mWriteBufferIndex(0), + mWriteBufferLength(0), + mBufferSegmentSize(0), + mBufferMaxSize(0) { NS_INIT_REFCNT(); diff --git a/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp b/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp index 0c892099f43..8f3a9746381 100644 --- a/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp +++ b/mozilla/netwerk/cache/filecache/nsNetDiskCache.cpp @@ -112,8 +112,8 @@ nsNetDiskCache::~nsNetDiskCache() if(mDBCorrupted) { nsCOMPtr directoryEnumerator; - nsresult rv = mDiskCacheFolder->GetDirectoryEntries( getter_AddRefs( directoryEnumerator) ) ; - if ( NS_FAILED ( rv ) ) + nsresult res = mDiskCacheFolder->GetDirectoryEntries( getter_AddRefs( directoryEnumerator) ) ; + if ( NS_FAILED ( res ) ) return; nsCString trash("trash") ; @@ -571,9 +571,9 @@ nsNetDiskCache::RemoveAll(void) // Delete all the files in the cache directory // Could I just delete the cache folder????? --DJM nsCOMPtr directoryEnumerator; - nsresult rv = mDiskCacheFolder->GetDirectoryEntries( getter_AddRefs( directoryEnumerator) ) ; - if ( NS_FAILED ( rv ) ) - return rv; + nsresult res = mDiskCacheFolder->GetDirectoryEntries( getter_AddRefs( directoryEnumerator) ) ; + if ( NS_FAILED ( res ) ) + return res; nsCOMPtr file; diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPRequest.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPRequest.cpp index 1dc8b700202..54e0e4377fd 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPRequest.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPRequest.cpp @@ -56,13 +56,13 @@ nsHTTPRequest::nsHTTPRequest(nsIURI* i_URL, nsHTTPHandler* i_Handler, PRUint32 b : mMethod(i_Method), mVersion(HTTP_ONE_ZERO), - mRequestSpec(0), - mDoKeepAlive(PR_FALSE), mKeepAliveTimeout (2*60), + mAttempts (0), + mDoKeepAlive(PR_FALSE), + mRequestSpec(0), + mHandler (i_Handler), mBufferSegmentSize(bufferSegmentSize), mBufferMaxSize(bufferMaxSize), - mAttempts (0), - mHandler (i_Handler), mAbortStatus(NS_OK) { NS_INIT_REFCNT(); @@ -658,3 +658,4 @@ nsHTTPRequest::formHeaders () return NS_OK; } + diff --git a/mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp b/mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp index 0004b1149c7..f24de5fcfa2 100644 --- a/mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp +++ b/mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp @@ -35,12 +35,12 @@ NS_IMPL_THREADSAFE_ISUPPORTS2 (nsHTTPCompressConv, nsIStreamConverter, nsIStream // nsFTPDirListingConv methods nsHTTPCompressConv::nsHTTPCompressConv () : mListener (nsnull), - mInpBuffer (NULL), mInpBufferLen (0), - mOutBuffer (NULL), mOutBufferLen (0), mMode (HTTP_COMPRESS_IDENTITY), + mOutBuffer (NULL), mInpBuffer (NULL), + mOutBufferLen (0), mInpBufferLen (0), mCheckHeaderDone (PR_FALSE), - mGzipStreamInitialized (PR_FALSE), mGzipStreamEnded (PR_FALSE), - hMode (0), mLen (0), mSkipCount (0), mFlags (0) + mGzipStreamEnded (PR_FALSE), mGzipStreamInitialized (PR_FALSE), + mLen (0), hMode (0), mSkipCount (0), mFlags (0) { NS_INIT_ISUPPORTS (); } diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp index 133ce8fb3d0..829a5995038 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.cpp +++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp @@ -1709,7 +1709,7 @@ nsresult CNavDTD::HandleSavedTokens(PRInt32 anIndex) { PRInt32 attrCount; PRInt32 theTopIndex = anIndex + 1; PRInt32 theTagCount = mBodyContext->GetCount(); - eHTMLTags theParentTag= mBodyContext->TagAt(anIndex); + //eHTMLTags theParentTag= mBodyContext->TagAt(anIndex); //XXX In the content sink, FORM behaves as a container for parents //other than eHTMLTag_table,eHTMLTag_tbody,eHTMLTag_tr,eHTMLTag_col, diff --git a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp index fbd5a5e7b21..3ee154f932e 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -1011,7 +1011,7 @@ nsHTMLContentSinkStream::AddLeaf(const nsIParserNode& aNode){ // and we'd better rewrap the whole text node. PRBool nsHTMLContentSinkStream::HasLongLines(const nsString& text) { - const PRInt32 longLineLen = 128; + const PRUint32 longLineLen = 128; nsString str = text; PRUint32 start=0; PRUint32 theLen=text.Length(); diff --git a/mozilla/rdf/base/src/nsRDFParserUtils.cpp b/mozilla/rdf/base/src/nsRDFParserUtils.cpp index eec60e107b9..17279fa23c5 100644 --- a/mozilla/rdf/base/src/nsRDFParserUtils.cpp +++ b/mozilla/rdf/base/src/nsRDFParserUtils.cpp @@ -99,7 +99,7 @@ nsRDFParserUtils::StripAndConvert(nsString& aResult) // should we be doing that? If so then it needs to live in two places (bad) // so we should add a translate numeric entity method from the parser... char cbuf[100]; - PRInt32 i = 0; + PRUint32 i = 0; while (i < aResult.Length()) { // If we have the start of an entity (and it's not at the end of // our string) then translate the entity into it's unicode value. @@ -112,7 +112,7 @@ nsRDFParserUtils::StripAndConvert(nsString& aResult) char* cp = cbuf; char* limit = cp + sizeof(cbuf) - 1; PRBool ok = PR_FALSE; - PRInt32 slen = aResult.Length(); + PRUint32 slen = aResult.Length(); while ((i < slen) && (cp < limit)) { PRUnichar f = aResult.CharAt(i); if (f == ';') { @@ -153,7 +153,7 @@ nsRDFParserUtils::StripAndConvert(nsString& aResult) char* limit = cp + sizeof(cbuf) - 1; *cp++ = char(e); PRBool ok = PR_FALSE; - PRInt32 slen = aResult.Length(); + PRUint32 slen = aResult.Length(); while ((i < slen) && (cp < limit)) { PRUnichar f = aResult.CharAt(i); if (f == ';') { diff --git a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp index 35a51c02a69..9ef2cefd038 100644 --- a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp @@ -1243,18 +1243,20 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCAutoString& aProviderTy installContainer->Init(installSource, resource); } - // Put all our elements into the install container. - nsCOMPtr seqKids; - container->GetElements(getter_AddRefs(seqKids)); - PRBool moreKids; - seqKids->HasMoreElements(&moreKids); - while (moreKids) { - nsCOMPtr supp; - seqKids->GetNext(getter_AddRefs(supp)); - nsCOMPtr kid = do_QueryInterface(supp); - installContainer->AppendElement(kid); - seqKids->HasMoreElements(&moreKids); - } + { // Restrict variable scope + // Put all our elements into the install container. + nsCOMPtr seqKids; + container->GetElements(getter_AddRefs(seqKids)); + PRBool moreKids; + seqKids->HasMoreElements(&moreKids); + while (moreKids) { + nsCOMPtr supp; + seqKids->GetNext(getter_AddRefs(supp)); + nsCOMPtr kid = do_QueryInterface(supp); + installContainer->AppendElement(kid); + seqKids->HasMoreElements(&moreKids); + } + } // See if we're a packages seq. If so, we need to set up the baseURL and // the package arcs. diff --git a/mozilla/rdf/content/src/nsXULDocument.cpp b/mozilla/rdf/content/src/nsXULDocument.cpp index d373610bc76..84fa6f1e1cc 100644 --- a/mozilla/rdf/content/src/nsXULDocument.cpp +++ b/mozilla/rdf/content/src/nsXULDocument.cpp @@ -5286,7 +5286,7 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement) // // rdf:bookmarks rdf:history http://foo.bar.com/blah.cgi?baz=9 // - PRInt32 first = 0; + PRUint32 first = 0; while(1) { while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first))) @@ -5295,7 +5295,7 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement) if (first >= datasources.Length()) break; - PRInt32 last = first; + PRUint32 last = first; while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last))) ++last; diff --git a/mozilla/uriloader/base/nsURILoader.cpp b/mozilla/uriloader/base/nsURILoader.cpp index 4787ea50d2c..a67949d0b23 100644 --- a/mozilla/uriloader/base/nsURILoader.cpp +++ b/mozilla/uriloader/base/nsURILoader.cpp @@ -584,10 +584,10 @@ NS_IMETHODIMP nsURILoader::OpenURIVia(nsIChannel * aChannel, aChannel->GetURI(getter_AddRefs(uri)); if(uri) { - PRBool abort = PR_FALSE; - winContextListener->OnStartURIOpen(uri, aWindowTarget, &abort); + PRBool doAbort = PR_FALSE; + winContextListener->OnStartURIOpen(uri, aWindowTarget, &doAbort); - if(abort) + if(doAbort) return NS_OK; } } diff --git a/mozilla/xpcom/ds/nsTextFormatter.cpp b/mozilla/xpcom/ds/nsTextFormatter.cpp index bd3c18b9bb6..537ba8e18fe 100644 --- a/mozilla/xpcom/ds/nsTextFormatter.cpp +++ b/mozilla/xpcom/ds/nsTextFormatter.cpp @@ -1402,7 +1402,7 @@ PRBool nsTextFormatter::SelfTest() nsAutoString out(buf); printf("%s \n",out.ToNewCString()); const PRUnichar *uout = out.GetUnicode(); - for(int i=0;i