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

RESOLVED FIXED in mozilla12

Status

()

Core
Editor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: decoder, Assigned: Ehsan)

Tracking

(Blocks: 1 bug)

Trunk
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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
Created attachment 585567 [details] [diff] [review]
Patch (v1)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #585567 - Flags: review?(roc)
Attachment #585567 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6840cbb0b4cf
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/6840cbb0b4cf
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.