On Wed, Nov 08, 2017 at 07:17:48PM +0100, Timo Rothenpieler wrote:
> Fixes CID #1417663
> ---
>  libavfilter/af_haas.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavfilter/af_haas.c b/libavfilter/af_haas.c
> index 691c251f54..fac4b6cf2f 100644
> --- a/libavfilter/af_haas.c
> +++ b/libavfilter/af_haas.c
> @@ -162,6 +162,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>          case 1: mid = src[1]; break;
>          case 2: mid = (src[0] + src[1]) * 0.5; break;
>          case 3: mid = (src[0] - src[1]) * 0.5; break;
> +        default: return AVERROR(EINVAL);
>          }

This condition is impossible, which makes this a false positive and
it should be marked as such.
you can add a av_assert if you want to ensure future changes to the
code do not add a codepath that can trigger this

the return is unreachable and the next generation of static analyzer
will flag that as dead code

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to