Closed Bug 1378481 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: Layout, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

Details

Attachments

(1 file)

[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
Attached patch fixSplinter Review
Attachment #8883675 - Flags: review?(dholbert)
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.
Attachment #8883675 - Flags: review?(dholbert) → review+
Oops, sorry.  I misread my bugmail and thought the r+ in bug 1377490 was for this bug!
https://hg.mozilla.org/mozilla-central/rev/8648cd5683af
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: