If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Suppress warnings in third-party code: libstagefright

RESOLVED FIXED in Firefox 32

Status

()

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

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks: 1 bug)

unspecified
mozilla32
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox31 wontfix, firefox32 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8430176 [details] [diff] [review]
suppress-stagefright-warnings.patch

This patch suppresses the following gcc, clang, and MSVC warnings. It also fixes a -Wtype-limits bug in our Adts.cpp.

The libstagefright directory is now warning-free with clang and MSVC, but I can't mark the directory as FAIL_ON_WARNINGS because Android gcc reports an unsuppressable warning about redefining _GNU_SOURCE macro:

media/libstagefright/system/core/liblog/logprint.c:18:0: error: "_GNU_SOURCE" redefined [-Werror]

* Fixed warning:

media/libstagefright/binding/Adts.cpp:44:47: warning: comparison is always false due to limited range of data type [-Wtype-limits]

* Suppressed warnings:

media/libstagefright/frameworks/av/include/media/stagefright/foundation/ADebug.h:51:20 [-Wsign-compare] comparison of integers of different signs: 'const unsigned int' and 'con
media/libstagefright/frameworks/av/media/libstagefright/ESDS.cpp:95:44 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:257:13 [-Wunused-function] unused function 'hexdump'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:261:28 [-Wformat] format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsig
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:406:53 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:825:62 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1238:22 [-Wunused-variable] unused variable 'data_ref_index'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1290:22 [-Wunused-variable] unused variable 'data_ref_index'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1840:28 [-Wformat] length modifier 'L' results in undefined behavior or no effect with 'd' conversion
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1840:32 [-Wformat] length modifier 'L' results in undefined behavior or no effect with 'd' conversion
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1873:29 [-Wtautological-constant-out-of-range-compare] comparison of constant 2 with expression of ty
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1943:13 [-Wunused-variable] unused variable 'dx'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1946:13 [-Wunused-variable] unused variable 'dy'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:2193:40 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:2951:14 [-Wsign-compare] comparison of integers of different signs: 'off_t' (aka 'long long') and 'un
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:3596:13 [-Wunused-function] unused function 'LegacySniffMPEG4'
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp:3620:13 [-Wunused-function] unused function 'isCompatibleBrand'
media/libstagefright/frameworks/av/media/libstagefright/MediaBuffer.cpp:138:55 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/MediaBuffer.cpp:138:63 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/MediaBuffer.cpp:138:71 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/MetaData.cpp:298:56 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/MetaData.cpp:324:72 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:45:37 [-Wsign-compare] comparison of integers of different signs: 'off_t' (aka 'long long') and 'size_t' (ak
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:47:34 [-Wsign-compare] comparison of integers of different signs: 'off_t' (aka 'long long') and 'size_t' (ak
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:176:56 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:659:22 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:659:31 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:659:43 [-Wformat] format specifies type 'int' but the argument has type 'unsigned long'
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:700:22 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:700:31 [-Wformat] format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:700:43 [-Wformat] format specifies type 'int' but the argument has type 'unsigned long'
media/libstagefright/frameworks/av/media/libstagefright/id3/ID3.cpp:818:21 [-Wunused-variable] unused variable 'picType'
media/libstagefright/system/core/include/log/logger.h:54:37 [-Wcomment] '/*' within block comment
media/libstagefright/system/core/include/utils/Condition.h:80:13 [-Wunused-private-field] private field 'mState' is not used
media/libstagefright/system/core/liblog/fake_log_device.c:358:15 [-Wsign-compare] comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long'
media/libstagefright/system/core/libutils/String16.cpp:70:26 [-Wunused-variable] unused variable 'u8end'

media/libstagefright/system/core/liblog/fake_log_device.c: In function 'configureInitialState':
media/libstagefright/system/core/liblog/fake_log_device.c:223:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c:302:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c: In function 'fake_writev':
media/libstagefright/system/core/liblog/fake_log_device.c:358:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
media/libstagefright/system/core/liblog/fake_log_device.c: In function 'showLog':
media/libstagefright/system/core/liblog/fake_log_device.c:421:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c:471:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c:485:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c:509:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c:519:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
media/libstagefright/system/core/liblog/fake_log_device.c: In function 'logWritev':
media/libstagefright/system/core/liblog/fake_log_device.c:616:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

media/libstagefright/frameworks/av/include/media/stagefright/MetaData.h:33:20: warning: multi-character character constant [-Wmultichar]

media\libstagefright\system/core/liblog/logprint.c(745) : warning C4101: 'headerBuf' : unreferenced local variable
media\libstagefright\system/core/liblog/logprint.c(846) : warning C4101: 'i' : unreferenced local variable
media\libstagefright\system/core/liblog/logprint.c(947) : warning C4013: 'write' undefined; assuming extern returning int
media/libstagefright/system/core/libutils/RefBase.cpp(587) : warning C4355: 'this' : used in base member initializer list
media\libstagefright\frameworks/av/media/libstagefright/id3/ID3.cpp(502) : warning C4309: '=' : truncation of constant value
media\libstagefright\frameworks/av/media/libstagefright/id3/ID3.cpp(505) : warning C4309: '=' : truncation of constant value
media\libstagefright\frameworks/av/media/libstagefright/MPEG4Extractor.cpp(1854) : warning C4018: '<' : signed/unsigned mismatch
media\libstagefright\frameworks/av/media/libstagefright/MPEG4Extractor.cpp(1873) : warning C4804: '>' : unsafe use of type 'bool' in operation
media\libstagefright\frameworks/av/media/libstagefright/MPEG4Extractor.cpp(3612) : warning C4305: '=' : truncation from 'double' to 'float'
Attachment #8430176 - Flags: review?(cajbir.bugzilla)
Comment on attachment 8430176 [details] [diff] [review]
suppress-stagefright-warnings.patch

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

f? ajones so he knows what's going on...
Attachment #8430176 - Flags: feedback?(ajones)
Comment on attachment 8430176 [details] [diff] [review]
suppress-stagefright-warnings.patch

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

Excellent. Thanks for the patch.
Attachment #8430176 - Flags: feedback?(ajones) → feedback+

Updated

3 years ago
Attachment #8430176 - Flags: review?(cajbir.bugzilla) → review+
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/29d2b976dcb5
status-firefox32: affected → fixed
https://hg.mozilla.org/mozilla-central/rev/29d2b976dcb5
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
(Assignee)

Updated

3 years ago
Depends on: 1031978
You need to log in before you can comment on or make changes to this bug.