Closed Bug 1361590 Opened 8 years ago Closed 8 years ago

Coverity report: nsMathMLmoFrame::​nsMathMLmoFrame(nsStyleContext *): A scalar field is not initialized by the constructor

Categories

(Core :: MathML, defect)

53 Branch
defect
Not set
minor

Tracking

()

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

People

(Reporter: MatsPalmgren_bugz, Assigned: fredw)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, good-first-bug, regression, Whiteboard: [CID 750314])

Attachments

(1 file)

Coverity CID 750314 Uninitialized scalar field The field will contain an arbitrary value left over from earlier computations. In nsMathMLmoFrame::​nsMathMLmoFrame(nsStyleContext *): A scalar field is not initialized by the constructor 82protected: 2. uninit_member: Non-static class member mFlags is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member mMinSize is not initialized in this constructor nor in any functions that it calls. CID 750314 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)6. uninit_member: Non-static class member mMaxSize is not initialized in this constructor nor in any functions that it calls. 83 explicit nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {} 84 virtual ~nsMathMLmoFrame(); 85 86 nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator. 1. member_decl: Class member declaration for mFlags. 87 nsOperatorFlags mFlags; 3. member_decl: Class member declaration for mMinSize. 88 float mMinSize; 5. member_decl: Class member declaration for mMaxSize. 89 float mMaxSize; http://searchfox.org/mozilla-central/rev/abe68d5dad139e376d5521ca1d4b7892e1e7f1ba/layout/mathml/nsMathMLmoFrame.h#83 Looks harmless, but we should init these three members to zero in the ctor anyway.
Whiteboard: [CID 750314]
Attached patch Patch (deleted) — Splinter Review
Attachment #8865112 - Flags: review?(karlt)
Attachment #8865112 - Flags: review?(karlt) → review?(mats)
Attachment #8865112 - Flags: review?(mats) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ec70344f616b A scalar field is not initialized by the constructor. r=karlt
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee: nobody → fred.wang
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: