Bug 773842 - Fix build warnings under content/ r=mounir

This commit is contained in:
David Zbarsky 2012-08-10 14:01:16 -04:00
parent 0513cf7569
commit b462ec011a
18 changed files with 21 additions and 29 deletions

View File

@ -15,7 +15,6 @@ LIBRARY_NAME = gkconbase_s
LIBXUL_LIBRARY = 1
EXPORTS = \
nsAtomListUtils.h \
nsAttrName.h \

View File

@ -1199,8 +1199,8 @@ nsContentSubtreeIterator::Init(nsIDOMRange* aRange)
PRInt32 endOffset = mRange->EndOffset();
MOZ_ASSERT(mCommonParent && startParent && endParent);
// Bug 767169
MOZ_ASSERT(startOffset <= startParent->Length() &&
endOffset <= endParent->Length());
MOZ_ASSERT(PRUint32(startOffset) <= startParent->Length() &&
PRUint32(endOffset) <= endParent->Length());
// short circuit when start node == end node
if (startParent == endParent) {

View File

@ -57,7 +57,6 @@ private:
nsCOMPtr<nsIURI> mBaseURI;
nsWeakPtr mScriptHandlingObject;
bool mLoopingForSyncLoad;
bool mAttemptedInit;
};

View File

@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconevents_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
EXPORTS = \
nsEventStateManager.h \

View File

@ -97,7 +97,7 @@ protected:
bool mPointsInitialized;
};
class nsDOMTouchList : public nsIDOMTouchList
class nsDOMTouchList MOZ_FINAL : public nsIDOMTouchList
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS

View File

@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconhtmldoc_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
nsHTMLContentSink.cpp \

View File

@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkcontentmathml_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
nsMathMLElement.cpp \

View File

@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkcontentsvg_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
DOMSVGAnimatedLengthList.cpp \

View File

@ -14,7 +14,6 @@ MODULE = content
LIBRARY_NAME = gkconxbl_s
LIBXUL_LIBRARY = 1
CPPSRCS = \
nsXBLBinding.cpp \
nsXBLPrototypeBinding.cpp \

View File

@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconxmlcon_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
nsXMLElement.cpp \

View File

@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconxmldoc_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
nsXMLContentSink.cpp \

View File

@ -29,7 +29,6 @@ NS_IMPL_ISUPPORTS2(nsXMLPrettyPrinter,
nsIMutationObserver)
nsXMLPrettyPrinter::nsXMLPrettyPrinter() : mDocument(nullptr),
mUpdateDepth(0),
mUnhookPending(false)
{
}
@ -44,7 +43,7 @@ nsXMLPrettyPrinter::PrettyPrint(nsIDocument* aDocument,
bool* aDidPrettyPrint)
{
*aDidPrettyPrint = false;
// Check for iframe with display:none. Such iframes don't have presshells
if (!aDocument->GetShell()) {
return NS_OK;

View File

@ -49,7 +49,6 @@ private:
void MaybeUnhook(nsIContent* aContent);
nsIDocument* mDocument; //weak. Set as long as we're observing the document
PRUint32 mUpdateDepth;
bool mUnhookPending;
};

View File

@ -26,14 +26,12 @@
class nsXPathEvaluatorParseContext : public txIParseContext
{
public:
nsXPathEvaluatorParseContext(nsXPathEvaluator &aEvaluator,
nsIDOMXPathNSResolver* aResolver,
nsXPathEvaluatorParseContext(nsIDOMXPathNSResolver* aResolver,
nsTArray<PRInt32> *aNamespaceIDs,
nsTArray<nsCString> *aContractIDs,
nsCOMArray<nsISupports> *aState,
bool aIsCaseSensitive)
: mEvaluator(aEvaluator),
mResolver(aResolver),
: mResolver(aResolver),
mNamespaceIDs(aNamespaceIDs),
mContractIDs(aContractIDs),
mState(aState),
@ -57,7 +55,6 @@ public:
void SetErrorOffset(PRUint32 aOffset);
private:
nsXPathEvaluator &mEvaluator;
nsIDOMXPathNSResolver* mResolver;
nsTArray<PRInt32> *mNamespaceIDs;
nsTArray<nsCString> *mContractIDs;
@ -191,7 +188,7 @@ nsXPathEvaluator::CreateExpression(const nsAString & aExpression,
}
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
nsXPathEvaluatorParseContext pContext(*this, aResolver, aNamespaceIDs,
nsXPathEvaluatorParseContext pContext(aResolver, aNamespaceIDs,
aContractIDs, aState,
!(doc && doc->IsHTML()));

View File

@ -99,9 +99,9 @@ public:
txXPCOMExtensionFunctionCall(nsISupports *aHelper, const nsIID &aIID,
PRUint16 aMethodIndex,
#ifdef TX_TO_STRING
PRInt32 aNamespaceID, nsIAtom *aName,
nsIAtom *aName,
#endif
nsISupports *aState);
nsISupports *aState);
TX_DECL_FUNCTION
@ -113,7 +113,6 @@ private:
nsIID mIID;
PRUint16 mMethodIndex;
#ifdef TX_TO_STRING
PRInt32 mNamespaceID;
nsCOMPtr<nsIAtom> mName;
#endif
nsCOMPtr<nsISupports> mState;
@ -123,7 +122,6 @@ txXPCOMExtensionFunctionCall::txXPCOMExtensionFunctionCall(nsISupports *aHelper,
const nsIID &aIID,
PRUint16 aMethodIndex,
#ifdef TX_TO_STRING
PRInt32 aNamespaceID,
nsIAtom *aName,
#endif
nsISupports *aState)
@ -131,7 +129,6 @@ txXPCOMExtensionFunctionCall::txXPCOMExtensionFunctionCall(nsISupports *aHelper,
mIID(aIID),
mMethodIndex(aMethodIndex),
#ifdef TX_TO_STRING
mNamespaceID(aNamespaceID),
mName(aName),
#endif
mState(aState)
@ -248,7 +245,7 @@ TX_ResolveFunctionCallXPCOM(const nsCString &aContractID, PRInt32 aNamespaceID,
*aFunction = new txXPCOMExtensionFunctionCall(helper, iid, methodIndex,
#ifdef TX_TO_STRING
aNamespaceID, aName,
aName,
#endif
aState);

View File

@ -859,9 +859,8 @@ txStylesheetCompilerState::resolveNamespacePrefix(nsIAtom* aPrefix,
class txErrorFunctionCall : public FunctionCall
{
public:
txErrorFunctionCall(nsIAtom* aName, const PRInt32 aID)
: mName(aName),
mID(aID)
txErrorFunctionCall(nsIAtom* aName)
: mName(aName)
{
}
@ -869,7 +868,6 @@ public:
private:
nsCOMPtr<nsIAtom> mName;
PRInt32 mID;
};
nsresult
@ -1092,7 +1090,7 @@ txStylesheetCompilerState::resolveFunctionCall(nsIAtom* aName, PRInt32 aID,
nsresult rv = findFunction(aName, aID, this, aFunction);
if (rv == NS_ERROR_XPATH_UNKNOWN_FUNCTION &&
(aID != kNameSpaceID_None || fcp())) {
*aFunction = new txErrorFunctionCall(aName, aID);
*aFunction = new txErrorFunctionCall(aName);
rv = *aFunction ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}

View File

@ -12,6 +12,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkcontentxtf_s
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \
nsXMLContentBuilder.cpp \

View File

@ -7,6 +7,7 @@ DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk