Closed Bug 762430 Opened 11 years ago Closed 11 years ago

warning: ‘res’ may be used uninitialized in nsHTMLAbsPosition.cpp

Categories

(Core :: DOM: Editor, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: ayg, Assigned: ayg)

Details

Attachments

(1 file)

/mnt/extra/checkouts/mozilla-central/editor/libeditor/html/nsHTMLAbsPosition.cpp: In member function ‘virtual nsresult nsHTMLEditor::AbsolutelyPositionElement(nsIDOMElement*, bool)’:
/mnt/extra/checkouts/mozilla-central/editor/libeditor/html/nsHTMLAbsPosition.cpp:492:12: warning: ‘res’ may be used uninitialized in this function [-Wuninitialized]
Flags: in-testsuite-
Attached patch Patch v1Splinter Review
FWIW, the warning looks legit: res will be returned uninitialized if aEnabled && parentNode->GetChildCount() != 1.  Try: https://tbpl.mozilla.org/?tree=Try&rev=698df2d0749b
Attachment #630946 - Flags: review?(ehsan)
Attachment #630946 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/3e12ea5cc535

(Merged by Ed Morley)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.