Closed Bug 88901 Opened 24 years ago Closed 24 years ago

Ill formed code in MozillDocument.cpp in Document::createAttributeNS

Categories

(Core :: XSLT, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: dbradley, Assigned: peterv)

Details

Attachments

(1 file)

Encountered the following warning: d:\cvsroot\mozilla\extensions\transformiix\source\xml\dom\mozImpl\MozillaDocument.cpp(280) : warning C4806: '&' : unsafe operation: no value of type 'bool' promoted to type 'const unsigned int' can equal the given constant This is caused by the test to NS_OK within NS_SUCCEEDED macro. I think it shouldn't be comparing to NS_OK, or it shouldn't be using the macro. One or the other but not both. Attr* Document::createAttributeNS(const String& aNamespaceURI, 273 const String& aName) 274 { 275 NSI_FROM_TX_NULL_CHECK(Document) 276 nsCOMPtr<nsIDOMAttr> attr; 277 278 if (NS_SUCCEEDED(nsDocument->CreateAttributeNS( 279 aNamespaceURI.getConstNSString(), aName.getConstNSString(), 280 getter_AddRefs(attr)) == NS_OK)) 281 return createAttribute(attr); 282 else 283 return NULL; 284 }
Summary: Ill formed code → Ill formed code in MozillDocument.cpp in Document::createAttributeNS
-> XSLT
Component: DOM Mozilla Extensions → XSLT
reassigning sorry
Assignee: jst → kvisco
QA Contact: lchiang → kvisco
yep, the | == NS_OK| should go. --> peterv
Assignee: kvisco → peterv
Attached patch FixSplinter Review
sr=scc
Checked in. Thanks all.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
it's in
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: