coverity complains about mAlignSelfFlags in "strut" flex item constructor

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: dholbert, Assigned: heycam)

Tracking

Trunk
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Coverity rightly has the following complaint:

layout/generic/nsFlexContainerFrame.cpp:1985:
  uninit_member: Non-static class member "mAlignSelfFlags" is not
  initialized in this constructor nor in any functions that it calls.

I noticed this in a reviewbot post on https://phabricator.services.mozilla.com/D20115 , though this issue is unrelated to that patch.

This is for the "strut" flexitem constructor (for visibility:collapse flex items, which don't participate in layout once we've determined their cross size). It aims to just initialize all members variables to trivial/inert default values, and it looks like we just forgot to include this member variable.

Attachment #9048928 - Attachment description: Bug 1533088: Initialize member-var FlexItem::mAlignSelfFlags in the trivial 'visibility:collapse' strut FlexItem constructor. r?heycam → Bug 1533088: Initialize member-var FlexItem::mAlignSelfFlags to zero, in the legacy-box and 'visibility:collapse' FlexItem scenarios. r?heycam
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/49d30719700f
Initialize member-var FlexItem::mAlignSelfFlags to zero, in the legacy-box and 'visibility:collapse' FlexItem scenarios. r=heycam
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.