Opened 8 years ago
Closed 8 years ago
#4516 closed defect (fixed)
ffplay.c can reference an uninitialized variable
Reported by: | Jeremy Huddleston | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffplay |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
As observed in:
http://fate.ffmpeg.org/log.cgi?time=20150426121301&log=compile&slot=x86_64-darwin-clang-3.7
/Users/jeremy/src/ffmpeg/fate/x86_64-darwin-clang-3.7/src/ffplay.c:1537:9: warning: variable 'diff' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (get_master_sync_type(is) != AV_SYNC_VIDEO_MASTER) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/jeremy/src/ffmpeg/fate/x86_64-darwin-clang-3.7/src/ffplay.c:1557:21: note: uninitialized use occurs here delay, -diff); ^~~~ /Users/jeremy/src/ffmpeg/fate/x86_64-darwin-clang-3.7/src/ffplay.c:1537:5: note: remove the 'if' if its condition is always true if (get_master_sync_type(is) != AV_SYNC_VIDEO_MASTER) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/jeremy/src/ffmpeg/fate/x86_64-darwin-clang-3.7/src/ffplay.c:1534:32: note: initialize the variable 'diff' to silence this warning double sync_threshold, diff; ^ = 0.0
Change History (2)
comment:1 by , 8 years ago
Version: | unspecified → git-master |
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Michael merged a fix for this from libav.