[FFmpeg-trac] #5101(avformat:new): Variables used uninitialized in libavformat/utils.c
FFmpeg
trac at avcodec.org
Tue Dec 22 05:40:41 CET 2015
#5101: Variables used uninitialized in libavformat/utils.c
---------------------------------------+----------------------------------
Reporter: jeremyhu | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: unspecified | Keywords:
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
---------------------------------------+----------------------------------
The following were observed when building N-77414-g484cc66 and should
probably be fixed:
{{{
libavformat/utils.c:1896:9: warning: variable 'pos_min' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (st->index_entries) {
^~~~~~~~~~~~~~~~~
libavformat/utils.c:1929:53: note: uninitialized use occurs here
pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max,
pos_limit,
^~~~~~~
libavformat/utils.c:1896:5: note: remove the 'if' if its condition is
always true
if (st->index_entries) {
^~~~~~~~~~~~~~~~~~~~~~~
libavformat/utils.c:1880:5: note: variable 'pos_min' is declared here
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
^
libavformat/utils.c:1918:13: warning: variable 'pos_max' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (index >= 0) {
^~~~~~~~~~
libavformat/utils.c:1929:62: note: uninitialized use occurs here
pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max,
pos_limit,
^~~~~~~
libavformat/utils.c:1918:9: note: remove the 'if' if its condition is
always true
if (index >= 0) {
^~~~~~~~~~~~~~~~
libavformat/utils.c:1896:9: warning: variable 'pos_max' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (st->index_entries) {
^~~~~~~~~~~~~~~~~
libavformat/utils.c:1929:62: note: uninitialized use occurs here
pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max,
pos_limit,
^~~~~~~
libavformat/utils.c:1896:5: note: remove the 'if' if its condition is
always true
if (st->index_entries) {
^~~~~~~~~~~~~~~~~~~~~~~
libavformat/utils.c:1880:5: note: variable 'pos_max' is declared here
int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
^
3 warnings generated.
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5101>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list