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]

RESOLVED FIXED in mozilla23

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

Trunk
mozilla23
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

6 years ago
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.)
Assignee

Updated

6 years ago
Assignee

Updated

6 years ago
Depends on: 851237
Assignee

Comment 1

6 years ago
Attachment #732998 - Flags: review?(jmuizelaar)
Assignee

Comment 2

6 years ago
[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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.