Closed Bug 945121 Opened 11 years ago Closed 11 years ago

Opt-only build warning: mfbt/tests/TestCeilingFloor.cpp:72:10: warning: unused variable 'MaxPow2' [-Wunused-variable]

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Opt-only build warning:
{
../../../../mfbt/tests/TestCeilingFloor.cpp:72:10: warning: unused variable 'MaxPow2' [-Wunused-variable]
  size_t MaxPow2 = size_t(1) << (sizeof(size_t) * CHAR_BIT - 1);
}

The variable is unused because it's checked in a MOZ_ASSERT, which is defined away in opt builds.

Sample build log w/ this warning:
https://tbpl.mozilla.org/php/getParsedLog.php?id=31303279&tree=Mozilla-Inbound
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8340896 - Flags: review?(jwalden+bmo)
Attachment #8340896 - Attachment description: fix → fix (use DebugOnly)
Attachment #8340896 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/2d21bfbd9163
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: