Opened 2 years ago

Last modified 2 years ago

#6754 new defect

libavfilter/signature_lookup.c:494: suspicious compare ?

Reported by: dcb Owned by:
Priority: normal Component: avfilter
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


ffmpeg-3.4/libavfilter/signature_lookup.c:494]: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?

Source code is

if (meandist < minmeandist

mode == MODE_FAST){

maybe better code

if (meandist < minmeandist

mode == MODE_FAST){

Change History (2)

comment:1 Changed 2 years ago by cehoyos

Please send your patches made with git format-patch to the FFmpeg development mailing list, patches (and patch suggestions) are ignored here.

How did you find the issues?

comment:2 Changed 2 years ago by dcb

How did you find the issues?

A static analyser called cppcheck, available from sourceforge.

I find it very useful for C and C++ development. It catches
a lot of problems compilers don't find.

Note: See TracTickets for help on using tickets.