[FFmpeg-trac] #5345(undetermined:new): resample.c has "&& 0" in one of its "if" checks, which disables code
FFmpeg
trac at avcodec.org
Wed Mar 16 19:07:19 CET 2016
#5345: resample.c has "&& 0" in one of its "if" checks, which disables code
-------------------------------------+-------------------------------------
Reporter: dholbert | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by dholbert):
Because it disables the condition and all of the code inside of it.
The code has this form right now:
if (condition && condition && 0) {
do stuff;
}
That entire block is dead code, because "&& 0" negates the condition.
The only explanation for it not being a typo is that the author intended
to explicitly disable this check & the code inside it. That may be the
case -- but if so, as I noted at the end of the bug report, this code
should probably just be deleted (since it's been disabled since 2004) or
disabled more explicitly using "#if 0" wrapper.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5345#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list