Closed Bug 929404 Opened 11 years ago Closed 11 years ago

Build error with --disable-opus --enable-warnings-as-errors: OggCodecState.cpp:65:16: error: ‘int16_t mozilla::LEInt16(const unsigned char*)’ defined but not used [-Werror=unused-function]

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

I can't build with these .mozconfig options...
{
ac_add_options --enable-debug --disable-optimize
ac_add_options --disable-opus
ac_add_options --enable-warnings-as-errors
}

...due to this build warning (treated as an error), for an unused opus-specific function that we unconditionally define but only use in #ifdef-opus code:
{
media/ogg/OggCodecState.cpp:65:16: error: ‘int16_t mozilla::LEInt16(const unsigned char*)’ defined but not used [-Werror=unused-function]
}
If we define the function as inline instead of static, the warning (error) goes away. Given that this is a one-liner anyway, it seems like a reasonable function to inline.
Attached patch fix v1Splinter Review
Attachment #820265 - Flags: review?(kinetik)
Summary: Build error with --disable-opus --enable-warnings-as-errors → Build error with --disable-opus --enable-warnings-as-errors: OggCodecState.cpp:65:16: error: ‘int16_t mozilla::LEInt16(const unsigned char*)’ defined but not used [-Werror=unused-function]
Comment on attachment 820265 [details] [diff] [review]
fix v1

Derf, feel free/encouraged to steal this review if you get to it before kinetik. :)

(If you prefer, I'm happy to add #ifdef wrappers around this function, instead of 'inline'.  'inline' just seemed cleaner & it's nicer if we want to call it in other parts of this file as well.)
Attachment #820265 - Flags: review?(tterribe)
Attachment #820265 - Flags: review?(tterribe) → review+
Attachment #820265 - Flags: review?(kinetik)
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/9a2fa71f2657
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: