Open Bug 1361651 Opened 7 years ago Updated 2 years ago

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

Categories

(Core :: Layout, defect, P3)

53 Branch
defect

Tracking

()

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

(Blocks 1 open bug, )

Details

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

Coverity CID 1286319 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsRubyBaseContainerFrame::​nsRubyBaseContainerFrame(nsStyleContext *): A scalar field is not initialized by the constructor



69  explicit nsRubyBaseContainerFrame(nsStyleContext* aContext)
70    : nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyBaseContainer)
  CID 1286319 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member mBaseline is not initialized in this constructor nor in any functions that it calls.
71  {}
This is sort of a false positive we only use mBaseline in GetLogicalBaseline()
and mBaseline is always set in Reflow(), and Reflow() must be called before
GetLogicalBaseline().

We should probably init mBaseline in the ctor to NS_INTRINSIC_WIDTH_UNKNOWN anyway
to catch any errors.
Whiteboard: [CID 1286319]
Priority: -- → P3
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.