From 67bcecbb48674bb23fcc2a86cf7d023ffc16b892 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 3 Dec 2002 06:53:22 +0000 Subject: [PATCH] get rid of build warning for unused var. --- content/base/src/nsDocument.cpp | 3 +-- content/xul/document/src/nsXULDocument.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 85f545612a2b..c3aa949d92c1 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1660,8 +1660,6 @@ void nsDocument::SetStyleSheetApplicableState(nsIStyleSheet* aSheet, { NS_PRECONDITION(aSheet, "null arg"); - PRInt32 indx; - PRInt32 count; // If we're actually in the document style sheet list if (-1 != mStyleSheets.IndexOf(aSheet)) { if (aApplicable) { @@ -1674,6 +1672,7 @@ void nsDocument::SetStyleSheetApplicableState(nsIStyleSheet* aSheet, // XXX Some (nsHTMLEditor, eg) call this function for sheets that // are not document sheets! So we have to always notify. + PRInt32 indx; // if an observer removes itself, we're ok (not if it removes others though) for (indx = mObservers.Count() - 1; indx >= 0; --indx) { nsIDocumentObserver* observer = diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 856801b0fa6f..899d208c4597 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -1535,8 +1535,6 @@ nsXULDocument::SetStyleSheetApplicableState(nsIStyleSheet* aSheet, PRBool aApplicable) { NS_PRECONDITION(nsnull != aSheet, "null arg"); - PRInt32 count; - PRInt32 i; // If we're actually in the document style sheet list if (-1 != mStyleSheets.IndexOf((void *)aSheet)) { @@ -1551,6 +1549,7 @@ nsXULDocument::SetStyleSheetApplicableState(nsIStyleSheet* aSheet, // XXX Some (nsHTMLEditor, eg) call this function for sheets that // are not document sheets! So we have to always notify. + PRInt32 i; // if an observer removes itself, we're ok (not if it removes others though) for (i = mObservers.Count() - 1; i >= 0; --i) { nsIDocumentObserver* observer =