Closed Bug 857740 Opened 11 years ago Closed 11 years ago

GCC 4.8 build warning: convolver.h:76:55: warning: typedef 'fixed_type_should_fit_in_float_mantissa' locally defined but not used [-Wunused-local-typedefs]

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

GCC 4.8 warns for an unused typedef from an under-the-hood typedef in a COMPILE_ASSERT used in gfx/2d/convolver.h:
{
gfx/2d/convolver.h:76:55: warning: typedef 'fixed_type_should_fit_in_float_mantissa' locally defined but not used [-Wunused-local-typedefs]
     COMPILE_ASSERT(sizeof(Fixed) == 2, fixed_type_should_fit_in_float_mantissa);
}

As we did in bug 851237 (which fixed another chunk of these warnings), we might as well just use MOZ_STATIC_ASSERT here.  It's got a typedef under the hood too, but it has annotations to tell the compiler that the unused typedef is OK. (added in "patch 1" on bug 851237)

(Alternately, we could fix this by adding some boilerplate to COMPILE_ASSERT like we did for MOZ_STATIC_ASSERT, but that's a bit more work (particularly for a macro that's defined in a third-party header).  Better to just consistently use our own known-good static-assertion macro where possible, IMHO.)
Depends on: 851237
Attachment #732998 - Flags: review?(jmuizelaar)
[adding dependency on bug 486918, which is where we imported this header]
Depends on: 486918
Attachment #732998 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/a451409c4d94
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: