diff mbox series

[FFmpeg-devel,3/4] avfilter/vf_huesaturation: Remove dead store

Message ID AM7PR03MB6660B97407D424CE8248EB0B8F9B9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 01923579f477ede876c1611844efa970aa928392
Headers show
Series [FFmpeg-devel,1/4] fftools/cmdutils: Fix undefined 1 << 31
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 18, 2021, 9:13 a.m. UTC
Fixes Coverity issue #1493345.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
The x = y also looks strange. Why does the parameter x exist at all
if it is immediately overwritten in the function?

 libavfilter/vf_huesaturation.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Steven Liu Nov. 18, 2021, 9:24 a.m. UTC | #1
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> 于2021年11月18日周四 下午5:14写道:
>
> Fixes Coverity issue #1493345.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> The x = y also looks strange. Why does the parameter x exist at all
> if it is immediately overwritten in the function?
>
>  libavfilter/vf_huesaturation.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c
> index af7ea33b9e..d4e3fea1c5 100644
> --- a/libavfilter/vf_huesaturation.c
> +++ b/libavfilter/vf_huesaturation.c
> @@ -297,7 +297,6 @@ static void transform_point(float matrix[4][4],
>                              float *tx, float *ty, float *tz)
>  {
>      x = y;
> -    *tx = x;
>      *tx = x * matrix[0][0] + y * matrix[1][0] + z * matrix[2][0] + matrix[3][0];
>      *ty = x * matrix[0][1] + y * matrix[1][1] + z * matrix[2][1] + matrix[3][1];
>      *tz = x * matrix[0][2] + y * matrix[1][2] + z * matrix[2][2] + matrix[3][2];
> --
> 2.30.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".


lgtm


Thanks
Steven
diff mbox series

Patch

diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c
index af7ea33b9e..d4e3fea1c5 100644
--- a/libavfilter/vf_huesaturation.c
+++ b/libavfilter/vf_huesaturation.c
@@ -297,7 +297,6 @@  static void transform_point(float matrix[4][4],
                             float *tx, float *ty, float *tz)
 {
     x = y;
-    *tx = x;
     *tx = x * matrix[0][0] + y * matrix[1][0] + z * matrix[2][0] + matrix[3][0];
     *ty = x * matrix[0][1] + y * matrix[1][1] + z * matrix[2][1] + matrix[3][1];
     *tz = x * matrix[0][2] + y * matrix[1][2] + z * matrix[2][2] + matrix[3][2];