[FFmpeg-trac] #3554(avdevice:new): lavfi.c: variable 'sink' is used uninitialized whenever type == AVMEDIA_TYPE_AUDIO
FFmpeg
trac at avcodec.org
Sun Apr 13 08:38:00 CEST 2014
#3554: lavfi.c: variable 'sink' is used uninitialized whenever type ==
AVMEDIA_TYPE_AUDIO
---------------------------------------+----------------------------------
Reporter: jeremyhu | Owner:
Type: defect | Status: new
Priority: normal | Component: avdevice
Version: unspecified | Keywords:
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
---------------------------------------+----------------------------------
I noticed this when looking at recent fate
http://fate.ffmpeg.org/log.cgi?time=20140413053349&log=compile&slot=i386
-darwin-clang-3.5-O3
{{{
CC libavdevice/lavfi.o
/Users/jeremy/src/ffmpeg/fate/i386-darwin-
clang-3.5-O3/src/libavdevice/lavfi.c:237:20: warning: variable 'sink' is
used uninitialized whenever 'if' condition is false [-Wsometimes-
uninitialized]
} else if (type == AVMEDIA_TYPE_AUDIO) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jeremy/src/ffmpeg/fate/i386-darwin-
clang-3.5-O3/src/libavdevice/lavfi.c:257:27: note: uninitialized use
occurs here
lavfi->sinks[i] = sink;
^~~~
/Users/jeremy/src/ffmpeg/fate/i386-darwin-
clang-3.5-O3/src/libavdevice/lavfi.c:237:16: note: remove the 'if' if its
condition is always true
} else if (type == AVMEDIA_TYPE_AUDIO) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jeremy/src/ffmpeg/fate/i386-darwin-
clang-3.5-O3/src/libavdevice/lavfi.c:219:30: note: initialize the variable
'sink' to silence this warning
AVFilterContext *sink;
^
= NULL
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3554>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list