Possible uninitialized variable in automode.c

RESOLVED WORKSFORME

Status

()

Core
WebRTC
RESOLVED WORKSFORME
6 years ago
5 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [WebRTC], [blocking-webrtc-])

(Reporter)

Description

6 years ago
356.36 Warning: -Wsometimes-uninitialized in /Users/ehsanakhgari/moz/mozilla-central/media/webrtc/trunk/src/modules/audio_coding/neteq/automode.c: variable 'packetLenSamp' is used uninitialized whenever 'if' condition is false
356.36 /Users/ehsanakhgari/moz/mozilla-central/media/webrtc/trunk/src/modules/audio_coding/neteq/automode.c:63:14: warning: variable 'packetLenSamp' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
356.36     else if (timeStamp > inst->lastTimeStamp)
356.36              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356.36 /Users/ehsanakhgari/moz/mozilla-central/media/webrtc/trunk/src/modules/audio_coding/neteq/automode.c:71:9: note: uninitialized use occurs here
356.36     if (packetLenSamp > 0)
356.36         ^~~~~~~~~~~~~
356.36 /Users/ehsanakhgari/moz/mozilla-central/media/webrtc/trunk/src/modules/audio_coding/neteq/automode.c:63:10: note: remove the 'if' if its condition is always true
356.36     else if (timeStamp > inst->lastTimeStamp)
356.36          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356.36 /Users/ehsanakhgari/moz/mozilla-central/media/webrtc/trunk/src/modules/audio_coding/neteq/automode.c:41:32: note: initialize the variable 'packetLenSamp' to silence this warning
356.36     WebRtc_Word16 packetLenSamp; /* packet speech length in samples */
356.36                                ^
356.36                                 = 0
This is fixed in the update of Webrtc.org that will be landing shortly.  The new code just has a plain else, so this problem goes away.
(Reporter)

Comment 2

6 years ago
Cool.  So, WONTFIX?

Updated

6 years ago
Whiteboard: [WebRTC], [blocking-webrtc-]

Comment 3

5 years ago
Randell: I presume that the landing of bug 830247 made this bug obsolete? If so, I suspect we can close it...
Flags: needinfo?(rjesup)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME

Updated

5 years ago
Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.