Closed Bug 703239 Opened 14 years ago Closed 14 years ago

fix build Warnings in editor/

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: atulagrwl, Assigned: atulagrwl)

Details

Attachments

(2 files, 2 obsolete files)

Attached file Warnings
Patch coming shortly.
Attached patch Patch v1 (obsolete) — Splinter Review
Assignee: nobody → atulagrwl
Attachment #575141 - Flags: review?(ehsan)
Comment on attachment 575141 [details] [diff] [review] Patch v1 Review of attachment 575141 [details] [diff] [review]: ----------------------------------------------------------------- This is great! r=me with the comments below. ::: editor/composer/src/nsComposerController.cpp @@ +44,5 @@ > > #define NS_REGISTER_ONE_COMMAND(_cmdClass, _cmdName) \ > { \ > _cmdClass* theCmd = new _cmdClass(); \ > + NS_ENSURE_TRUE(theCmd, NS_ERROR_OUT_OF_MEMORY); \ Now that you're here, can you please remove this NS_ENSURE_TRUE (and others below like it) too? operator new is infallible these days. Thanks! ::: editor/libeditor/html/nsHTMLEditor.cpp @@ +935,5 @@ > { > if (!aNode) > { > NS_NOTREACHED("null node passed to GetBlockNodeParent()"); > + return nsnull; Ouch! ::: editor/libeditor/html/nsHTMLEditorStyle.cpp @@ +672,1 @@ > (!aProperty && NodeIsProperty(aNode))) // or node is any prop and we asked for that Please remove the double parenthesis after if. Also, remove the trailing space after '(' on the first line.
Attachment #575141 - Flags: review?(ehsan) → review+
Attached patch Patch v1.10 (obsolete) — Splinter Review
Attachment #575141 - Attachment is obsolete: true
(In reply to Ehsan Akhgari [:ehsan] from comment #2) > Comment on attachment 575141 [details] [diff] [review] [diff] [details] [review] > Patch v1 > > Review of attachment 575141 [details] [diff] [review] [diff] [details] [review]: > ----------------------------------------------------------------- > > This is great! r=me with the comments below. > > ::: editor/composer/src/nsComposerController.cpp > Now that you're here, can you please remove this NS_ENSURE_TRUE (and others > below like it) too? operator new is infallible these days. > Done. > > ::: editor/libeditor/html/nsHTMLEditor.cpp > @@ +935,5 @@ > > { > > if (!aNode) > > { > > NS_NOTREACHED("null node passed to GetBlockNodeParent()"); > > + return nsnull; > > Ouch! This was intentional. Did I miss something? > > ::: editor/libeditor/html/nsHTMLEditorStyle.cpp > @@ +672,1 @@ > > (!aProperty && NodeIsProperty(aNode))) // or node is any prop and we asked for that > > Please remove the double parenthesis after if. Also, remove the trailing > space after '(' on the first line. Removed the trailing space but double parenthesis was intentional to shut compiler from throwing warnings. Please review so that I can mark this bug checkin-needed. Thanks !
Attachment #577594 - Flags: review?(ehsan)
Comment on attachment 577594 [details] [diff] [review] Patch v1.10 The "ouch" was because we'd missed that case all this time! Great work, thanks a lot!
Attachment #577594 - Flags: review?(ehsan) → review+
Thanks for reviewing :).
Keywords: checkin-needed
patching file editor/libeditor/html/nsHTMLEditor.cpp Hunk #1 FAILED at 932 :(
Keywords: checkin-needed
Attached patch Patch v1.50Splinter Review
rebase on current code.
Attachment #577594 - Attachment is obsolete: true
Keywords: checkin-needed
Flags: in-testsuite-
Keywords: checkin-needed
OS: Linux → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla12
Version: unspecified → Trunk
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: