[FFmpeg-devel] [PATCH] libavfilter/vf_paletteuse.c: fix warning due to misleading indentation

Clément Bœsch u at pkh.me
Sun Oct 2 21:38:21 EEST 2016


On Sun, Oct 02, 2016 at 05:58:30PM +0200, Adriano Pallavicino wrote:
> 

> From 93fe2a96d71ac219915ade0a9247e1ae4b931a27 Mon Sep 17 00:00:00 2001
> From: Adriano Pallavicino <adriano.pallavicino at gmail.com>
> Date: Sun, 2 Oct 2016 17:52:12 +0200
> Subject: [PATCH] =?UTF-8?q?Fix=20warning:=20this=20=E2=80=98if=E2=80=99=20?=
>  =?UTF-8?q?clause=20does=20not=20guard...=20[-Wmisleading-indentation]?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
>  Please enter the commit message for your changes. Lines starting
>  with '#' will be ignored, and an empty message aborts the commit.
>  On branch fix_if_clause
>  Changes to be committed:
> 	modified:   libavfilter/vf_paletteuse.c
> ---
>  libavfilter/vf_paletteuse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c
> index e063ff7..75d80d6 100644
> --- a/libavfilter/vf_paletteuse.c
> +++ b/libavfilter/vf_paletteuse.c
> @@ -444,7 +444,7 @@ static av_always_inline int set_frame(PaletteUseContext *s, AVFrame *out, AVFram
>                  if (down) {
>                      if (left2)      src[  src_linesize + x - 2] = dither_color(src[  src_linesize + x - 2], er, eg, eb, 1, 4);
>                      if (left)       src[  src_linesize + x - 1] = dither_color(src[  src_linesize + x - 1], er, eg, eb, 2, 4);
> -                                    src[  src_linesize + x    ] = dither_color(src[  src_linesize + x    ], er, eg, eb, 3, 4);
> +                    src[  src_linesize + x    ] = dither_color(src[  src_linesize + x    ], er, eg, eb, 3, 4);

At least remove on that line the spaces used for vertical alignment which
isn't relevant anymore after. It's goddamn ugly otherwise.

>                      if (right)      src[  src_linesize + x + 1] = dither_color(src[  src_linesize + x + 1], er, eg, eb, 2, 4);
>                      if (right2)     src[  src_linesize + x + 2] = dither_color(src[  src_linesize + x + 2], er, eg, eb, 1, 4);
>                  }

-- 
Clément B.


More information about the ffmpeg-devel mailing list