diff mbox series

[FFmpeg-devel] libavfi/pseudocolor: Add missing braces around initializers

Message ID CAB0OVGq=rPBUb5TgTWvZ=V4WHJ=YSzcpFXgEKR5BT+_mp2B6vg@mail.gmail.com
State Accepted
Commit 5a9aebac91e225440fd5f30897b88d6bdf265813
Headers show
Series [FFmpeg-devel] libavfi/pseudocolor: Add missing braces around initializers | expand

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

Carl Eugen Hoyos Feb. 16, 2021, 10:42 p.m. UTC
Hi,

attached patch fixes many warnings when compiling with gcc 10.

Please comment, Carl Eugen
Subject: [PATCH] lavfi/pseudocolor: Add missing braces around initializer.

Fixes many warnings.
---
 libavfilter/vf_pseudocolor.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Paul B Mahol Feb. 16, 2021, 10:43 p.m. UTC | #1
There are already 3 variants of this patch on list.
James Almer Feb. 16, 2021, 10:44 p.m. UTC | #2
On 2/16/2021 7:43 PM, Paul B Mahol wrote:
> There are already 3 variants of this patch on list.

Can you apply the first one that's confirmed to be correct?
Paul B Mahol Feb. 16, 2021, 10:47 p.m. UTC | #3
On Tue, Feb 16, 2021 at 11:44 PM James Almer <jamrial@gmail.com> wrote:

> On 2/16/2021 7:43 PM, Paul B Mahol wrote:
> > There are already 3 variants of this patch on list.
>
> Can you apply the first one that's confirmed to be correct?
>

I use clang 11. compiler
diff mbox series

Patch

diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
index fad7be600c..6f67c02eb7 100644
--- a/libavfilter/vf_pseudocolor.c
+++ b/libavfilter/vf_pseudocolor.c
@@ -108,10 +108,10 @@  static const Range spec2_range[] = {{0, 16}, {16, 22}, {22, 226}, {226, 236}, {2
 static const Range shadows_range[] = {{0, 32}, {32, 256}};
 static const Range highlights_range[] = {{0, 214}, {214, 224}, {224, 256}};
 
-static const Fill spec1_fills[] = {{0.5f, 0.f, .5f, 1.f}, {-1.f, -1.f, -1.f, 1.f}, {1.f, 0.f, 0.f, 1.f}};
-static const Fill spec2_fills[] = {{0.5f, 0.f, .5f, 1.f}, {0.f, 1.f, 1.f, 1.f}, {-1.f, -1.f, -1.f, 1.f}, {1.f, 1.f, 0.f, 1.f}, {1.f, 0.f, 0.f, 1.f}};
-static const Fill shadows_fills[] = {{0.8f, 0.4f, .8f, 1.f}, {-1.f, -1.f, -1.f, 1.f}};
-static const Fill highlights_fills[] = {{-1.f, -1.f, -1.f, 1.f}, {1.f, 0.3f, 0.6f, 1.f}, {1.f, 0.2f, .5f, 1.f}};
+static const Fill spec1_fills[] = {{{0.5f, 0.f, .5f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}};
+static const Fill spec2_fills[] = {{{0.5f, 0.f, .5f, 1.f}}, {{0.f, 1.f, 1.f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 1.f, 0.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}};
+static const Fill shadows_fills[] = {{{0.8f, 0.4f, .8f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}};
+static const Fill highlights_fills[] = {{{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.3f, 0.6f, 1.f}}, {{1.f, 0.2f, .5f, 1.f}}};
 
 static const Curve curves[] =
 {