Closed
Bug 1361659
Opened 7 years ago
Closed 7 years ago
Coverity report: mozilla::BRFrame::BRFrame(nsStyleContext *): A scalar field is not initialized by the constructor
Categories
(Core :: Layout, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox53 | --- | wontfix |
firefox54 | --- | wontfix |
firefox55 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: emilio)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, good-first-bug, regression, Whiteboard: [lang=C++][CID 1396665])
Coverity CID 1396665 Uninitialized scalar field The field will contain an arbitrary value left over from earlier computations. In mozilla::BRFrame::BRFrame(nsStyleContext *): A scalar field is not initialized by the constructor 65protected: 66 explicit BRFrame(nsStyleContext* aContext) 67 : nsFrame(aContext, LayoutFrameType::Br) CID 1396665 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member mAscent is not initialized in this constructor nor in any functions that it calls. 68 {}
Reporter | ||
Comment 1•7 years ago
|
||
This is sort of a false positive since we only use mAscent in GetLogicalBaseline() and mAscent is always set in Reflow(), and Reflow() must be called before GetLogicalBaseline(). We should probably init mAscent in the ctor to NS_INTRINSIC_WIDTH_UNKNOWN anyway to catch any errors. (Maybe also rename it to mBaseline to follow the naming convention used in other classes.)
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/952e377dbace Initialize BRFrame::mAscent. r=mats
Comment 3•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/952e377dbace
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Assignee: nobody → emilio+bugs
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox-esr52:
--- → unaffected
Updated•7 years ago
|
Blocks: coverity-analysis
Updated•7 years ago
|
Whiteboard: [lang=C++] → [lang=C++][CID 1396665]
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•