From 0c80133eea9d19b3a900ceeb5d84b4967b418603 Mon Sep 17 00:00:00 2001 From: "sicking%bigfoot.com" Date: Thu, 4 Mar 2004 18:04:29 +0000 Subject: [PATCH] Bug 236472: Fix 3 warnings. r/sr=tor --- content/base/src/nsAttrValue.cpp | 6 ++++++ content/html/content/src/nsGenericHTMLElement.cpp | 5 +++-- content/xul/content/src/nsXULElement.cpp | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/content/base/src/nsAttrValue.cpp b/content/base/src/nsAttrValue.cpp index 7fafa355977c..11c768ed0a61 100644 --- a/content/base/src/nsAttrValue.cpp +++ b/content/base/src/nsAttrValue.cpp @@ -419,6 +419,12 @@ nsAttrValue::GetColorValue(nscolor& aColor) const { aColor = NS_STATIC_CAST(nscolor, GetIntInternal()); + break; + } + default: + { + NS_NOTREACHED("unexpected basetype"); + break; } } diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 5d4e62af679f..aa7b6d1f3faf 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1605,8 +1605,9 @@ nsGenericHTMLElement::SetAttrAndNotify(PRInt32 aNamespaceID, PRBool aNotify) { nsresult rv; - PRUint8 modType = aModification ? nsIDOMMutationEvent::MODIFICATION : - nsIDOMMutationEvent::ADDITION; + PRUint8 modType = aModification ? + NS_STATIC_CAST(PRUint8. nsIDOMMutationEvent::MODIFICATION) : + NS_STATIC_CAST(PRUint8. nsIDOMMutationEvent::ADDITION); mozAutoDocUpdate updateBatch(mDocument, UPDATE_CONTENT_MODEL, aNotify); if (aNotify && mDocument) { diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 850d1c005a09..bc1b60e9f2a7 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -2192,8 +2192,9 @@ nsXULElement::SetAttrAndNotify(PRInt32 aNamespaceID, PRBool aNotify) { nsresult rv; - PRUint8 modType = aModification ? nsIDOMMutationEvent::MODIFICATION : - nsIDOMMutationEvent::ADDITION; + PRUint8 modType = aModification ? + NS_STATIC_CAST(PRUint8. nsIDOMMutationEvent::MODIFICATION) : + NS_STATIC_CAST(PRUint8. nsIDOMMutationEvent::ADDITION); mozAutoDocUpdate updateBatch(mDocument, UPDATE_CONTENT_MODEL, aNotify); if (aNotify && mDocument) {