diff mbox series

[FFmpeg-devel] vf_pseudocolor.c: fix build warning by adding braces

Message ID 20210208030057.8864-1-yejun.guo@intel.com
State New
Headers show
Series [FFmpeg-devel] vf_pseudocolor.c: fix build warning by adding braces
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Guo, Yejun Feb. 8, 2021, 3 a.m. UTC
the warning message is:
warning: missing braces around initializer [-Wmissing-braces]

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
---
 libavfilter/vf_pseudocolor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol Feb. 8, 2021, 9:41 a.m. UTC | #1
There is already similar patch by other developer.

On Mon, Feb 8, 2021 at 4:11 AM Guo, Yejun <yejun.guo@intel.com> wrote:

> the warning message is:
> warning: missing braces around initializer [-Wmissing-braces]
>
> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
> ---
>  libavfilter/vf_pseudocolor.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
> index 192839342b..3416ab19a9 100644
> --- a/libavfilter/vf_pseudocolor.c
> +++ b/libavfilter/vf_pseudocolor.c
> @@ -104,8 +104,8 @@ static const Range full_range   = {0, 256};
>  static const Range spec1_range[] = {{0, 16}, {16, 236}, {236, 256}};
>  static const Range spec2_range[] = {{0, 16}, {16, 22}, {22, 226}, {226,
> 236}, {236, 256}};
>
> -static const Fill spec1_fills[] = {{0.5f, 0.f, .5f}, {-1.f, -1.f, -1.f},
> {1.f, 0.f, 0.f}};
> -static const Fill spec2_fills[] = {{0.5f, 0.f, .5f}, {0.f, 1.f, 1.f},
> {-1.f, -1.f, -1.f}, {1.f, 1.f, 0.f}, {1.f, 0.f, 0.f}};
> +static const Fill spec1_fills[] = {{{0.5f, 0.f, .5f}}, {{-1.f, -1.f,
> -1.f}}, {{1.f, 0.f, 0.f}}};
> +static const Fill spec2_fills[] = {{{0.5f, 0.f, .5f}}, {{0.f, 1.f, 1.f}},
> {{-1.f, -1.f, -1.f}}, {{1.f, 1.f, 0.f}}, {{1.f, 0.f, 0.f}}};
>
>  static const Curve curves[] =
>  {
> --
> 2.17.1
>
> _______________________________________________
> 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".
diff mbox series

Patch

diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
index 192839342b..3416ab19a9 100644
--- a/libavfilter/vf_pseudocolor.c
+++ b/libavfilter/vf_pseudocolor.c
@@ -104,8 +104,8 @@  static const Range full_range   = {0, 256};
 static const Range spec1_range[] = {{0, 16}, {16, 236}, {236, 256}};
 static const Range spec2_range[] = {{0, 16}, {16, 22}, {22, 226}, {226, 236}, {236, 256}};
 
-static const Fill spec1_fills[] = {{0.5f, 0.f, .5f}, {-1.f, -1.f, -1.f}, {1.f, 0.f, 0.f}};
-static const Fill spec2_fills[] = {{0.5f, 0.f, .5f}, {0.f, 1.f, 1.f}, {-1.f, -1.f, -1.f}, {1.f, 1.f, 0.f}, {1.f, 0.f, 0.f}};
+static const Fill spec1_fills[] = {{{0.5f, 0.f, .5f}}, {{-1.f, -1.f, -1.f}}, {{1.f, 0.f, 0.f}}};
+static const Fill spec2_fills[] = {{{0.5f, 0.f, .5f}}, {{0.f, 1.f, 1.f}}, {{-1.f, -1.f, -1.f}}, {{1.f, 1.f, 0.f}}, {{1.f, 0.f, 0.f}}};
 
 static const Curve curves[] =
 {