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]

RESOLVED FIXED in mozilla27

Status

()

Core
Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla27
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
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+
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/9a2fa71f2657
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.