Closed Bug 1235232 Opened 4 years ago Closed 4 years ago

Fix -Wclass-varargs warnings in dom/media/

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

We're passing TimeUnit objects to a variadic function and the format string expects an int64_t. TimeUnit has just one member variable, a CheckedInt64, whose first member variable is an int64_t. So printing the TimeUnit argument on the stack might actually work, but the other argument values may be offset.

dom/media/ADTSDemuxer.cpp:481:10 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:513:11 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:526:14 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:527:23 [-Wclass-varargs] passing object of class type 'media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:532:11 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function

dom/media/MP3Demuxer.cpp:201:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:237:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:256:13 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:257:22 [-Wclass-varargs] passing object of class type 'media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:262:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
Attachment #8702094 - Flags: review?(ajones)
Priority: -- → P2
Comment on attachment 8702094 [details] [diff] [review]
dom-media_Wclass-varargs.patch

Review of attachment 8702094 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8702094 - Flags: review?(ajones) → review+
https://hg.mozilla.org/mozilla-central/rev/59f19aec5c4e
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Blocks: 1239539
You need to log in before you can comment on or make changes to this bug.