Closed Bug 1361517 Opened 3 years ago Closed 3 years ago

coverity report: Non-static class member "mAscent" is not initialized in this constructor nor in any functions that it calls.

Categories

(Core :: XUL, defect)

53 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- wontfix
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: mats, Assigned: emilio)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, regression, Whiteboard: [CID 1405756])

** CID 1405756:  Uninitialized members  (UNINIT_CTOR)
/layout/xul/nsBoxFrame.cpp: 141 in nsBoxFrame::nsBoxFrame(nsStyleContext *, mozilla::FrameType, bool, nsBoxLayout *)()


________________________________________________________________________________________________________
*** CID 1405756:  Uninitialized members  (UNINIT_CTOR)
/layout/xul/nsBoxFrame.cpp: 141 in nsBoxFrame::nsBoxFrame(nsStyleContext *, mozilla::FrameType, bool, nsBoxLayout *)()
135     
136       if (layout == nullptr) {
137         NS_NewSprocketLayout(layout);
138       }
139     
140       SetXULLayoutManager(layout);
>>>     CID 1405756:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "mAscent" is not initialized in this constructor nor in any functions that it calls.
141     }
142     
143     nsBoxFrame::~nsBoxFrame()
144     {
145     }
146
Indeed.

https://scan5.coverity.com/reports.htm#v47791/p10098/fileInstanceId=113895075&defectInstanceId=32009454&mergedDefectId=1405756

140  SetXULLayoutManager(layout);
   4. uninit_member: Non-static class member mFlex is not initialized in this constructor nor in any functions that it calls.
   CID 1405756 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)6. uninit_member: Non-static class member mAscent is not initialized in this constructor nor in any functions that it calls.
141}
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c18005944b91
Initialize nsBoxFrame::{mFlex,mAscent}. r=mats
https://hg.mozilla.org/mozilla-central/rev/c18005944b91
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee: nobody → emilio+bugs
Whiteboard: [CID 1405756]
You need to log in before you can comment on or make changes to this bug.