Fix some warnings in webrtc/signaling: -Wmaybe-uninitialized, -Wsign-compare, and -Wunreachable-code

RESOLVED FIXED in Firefox 35

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks 1 bug)

unspecified
mozilla35
x86
macOS
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox34 wontfix, firefox35 fixed)

Details

Attachments

(2 attachments)

webrtc::I420VideoFrame's height() and width() member functions return (signed) int, but GMPVideoCodec's mHeight and mWidth member variables are uint32_t.

media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp:248:28 [-Wsign-compare] comparison of integers of different signs: 'int' and 'uint32_t' (aka

media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp:249:29 [-Wsign-compare] comparison of integers of different signs: 'int' and 'uint32_t' (aka
Attachment #8488989 - Flags: review?(rjesup)
This patch also removes some unreachable `return` statements after MOZ_CRASH() calls. (clang's -Wunreachable-code warnings are not enabled in Firefox's default build configuration.)
Attachment #8488989 - Flags: review?(rjesup) → review+
Part 2: Fix some (not exactly false positive) -Wmaybe-uninitialized warnings in webrtc/signaling (from Android gcc).

media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp:485:17 [-Wmaybe-uninitialized] 'size' may be used uninitialized in this function
media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp:2085:196 [-Wmaybe-uninitialized] 'mediaType' may be used uninitialized in this function
media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_platform_udp.c:116:14 [-Wmaybe-uninitialized] 'addr_len' may be used uninitialized in this function
media/webrtc/signaling/src/sipcc/core/sipstack/ccsip_platform_udp.c:183:14 [-Wmaybe-uninitialized] 'addr_len' may be used uninitialized in this function
Attachment #8489035 - Flags: review?(rjesup)
Attachment #8489035 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/51cb121dd56e
https://hg.mozilla.org/integration/mozilla-inbound/rev/df5e00494964
Blocks: buildwarning
Summary: Fix -Wsign-compare warnings in webrtc/signaling → Fix some warnings in webrtc/signaling: -Wmaybe-uninitialized, -Wsign-compare, and -Wunreachable-code
https://hg.mozilla.org/mozilla-central/rev/51cb121dd56e
https://hg.mozilla.org/mozilla-central/rev/df5e00494964
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.