warning: 'roundingError' may be used uninitialized in this function

RESOLVED FIXED in Firefox 56

Status

()

Core
Layout
--
trivial
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: mats, Assigned: mats)

Tracking

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
[task 2017-07-05T14:42:51.050243Z] 14:42:51     INFO -  /home/worker/workspace/build/src/layout/generic/nsGridContainerFrame.cpp:4758:25: warning: 'roundingError' may be used uninitialized in this function [-Wmaybe-uninitialized]
[task 2017-07-05T14:42:51.051016Z] 14:42:51     INFO -         roundingError -= 1;
[task 2017-07-05T14:42:51.051529Z] 14:42:51     INFO -        

I'm guessing it's b/c the 'default' switch branch doesn't assign it.
http://searchfox.org/mozilla-central/rev/e8f4f51cd543f203e9cb861cecb7545ac43c836c/layout/generic/nsGridContainerFrame.cpp#4758
(Assignee)

Comment 1

11 months ago
Created attachment 8883675 [details] [diff] [review]
fix
Attachment #8883675 - Flags: review?(dholbert)

Comment 2

11 months ago
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8648cd5683af
Assign 'roundingError' in the default branch too, to avoid a maybe-uninitialized compiler warning.  r=dholbert
retroactive r=me ;)

This seems harmless, assuming it fixes the warning.
(Assignee)

Comment 4

11 months ago
Oops, sorry.  I misread my bugmail and thought the r+ in bug 1377490 was for this bug!

Comment 5

11 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8648cd5683af
Status: NEW → RESOLVED
Last Resolved: 11 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.