Closed Bug 712510 Opened 9 years ago Closed 9 years ago

Clang Static Analysis: Garbage return value in content/html/content/src/nsTextEditorState.cpp

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: decoder, Assigned: ehsan)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

The following report (in the URL field) has been generated by static analysis using Clang.

It would be good if someone familiar with the particular code could check if

- this is really a bug or a false positive
- and/or if it makes sense to adjust the code (even if there is not a real bug present, e.g. by adding a missing initialization).


In this particular report, the problem seems to be that the | nsresult rv; | variable declared in line 1173 could be returned uninitialized (there exists at least one path through the code). It would probably be good to initialize this variable to a sane default value to be sure.

Not sure which category this belongs to, please move to the right place if you know where this should go :)
I don't see this happening in practice but let's just shut the warning up.  :-)
Component: General → Editor
QA Contact: general → editor
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #585567 - Flags: review?(roc)
https://hg.mozilla.org/integration/mozilla-inbound/rev/6840cbb0b4cf
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/6840cbb0b4cf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.