[FFmpeg-trac] #8156(undetermined:open): PVS-studio big list of errors
FFmpeg
trac at avcodec.org
Mon Sep 23 22:53:29 EEST 2019
#8156: PVS-studio big list of errors
-------------------------------------+-------------------------------------
Reporter: Balling | Owner:
Type: defect | Status: open
Priority: normal | Component:
| undetermined
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Balling):
As said here https://patchwork.ffmpeg.org/patch/15133/ there is indeed and
empty check present. So I will show such expressions:
{{{
./libavformat/anm.c 114 warn V555 The expression
'(anm->nb_records - 1) > (0)' will work as 'anm->nb_records != 1'.
./libavformat/mp3enc.c 359 warn V555 The expression of the 'A - B
> 0' kind will work as 'A != B'.
./libavformat/wtvdec.c 697 warn V555 The expression '(size -
consumed) > (0)' will work as 'size != consumed'.
./libavformat/wtvdec.c 701 warn V555 The expression '(size -
consumed) > (0)' will work as 'size != consumed'.
./libavcodec/4xm.c 453 warn V555 The expression of the 'A - B
> 0' kind will work as 'A != B'.
./libavcodec/bmp.c 186 warn V555 The expression 'hsize -
ihsize - 14 > 0' will work as 'hsize - ihsize != 14'.
./libavcodec/bmp.c 193 warn V555 The expression 'hsize -
ihsize - 14 > 0' will work as 'hsize - ihsize != 14'.
./libavcodec/cbs_av1.c 231 warn V555 The expression 'w - 1 > 0'
will work as 'w != 1'.
./libavcodec/opus_rc.c 394 warn V555 The expression '(size -
rc->rb.bytes) > (0)' will work as 'size != rc->rb.bytes'.
./libavcodec/opus_rc.c 398 warn V555 The expression '(rc->rb.bytes
- lap) > (0)' will work as 'rc->rb.bytes != lap'.
}}}
Go forth!
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8156#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list