diff mbox series

[FFmpeg-devel,1/2] swscale/input: Remove spec-incompliant '; '

Message ID GV1P250MB07370A2874066BF522C7670A8F409@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit d2428d80ce4b791587a53cdb4828a84d077384f2
Headers show
Series [FFmpeg-devel,1/2] swscale/input: Remove spec-incompliant '; ' | expand

Checks

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

Commit Message

Andreas Rheinhardt Sept. 8, 2022, 2:31 a.m. UTC
These macros are definitions, not only declarations and therefore
should not contain a semicolon. Such a semicolon is actually
spec-incompliant, but compilers happen to accept them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libswscale/input.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Philip Langdale Sept. 8, 2022, 3:44 a.m. UTC | #1
On Thu,  8 Sep 2022 04:31:55 +0200
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:

> These macros are definitions, not only declarations and therefore
> should not contain a semicolon. Such a semicolon is actually
> spec-incompliant, but compilers happen to accept them.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libswscale/input.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libswscale/input.c b/libswscale/input.c
> index be8f3940e1..88e318e664 100644
> --- a/libswscale/input.c
> +++ b/libswscale/input.c
> @@ -583,8 +583,8 @@ static void yvy2ToUV_c(uint8_t *dstU, uint8_t
> *dstV, const uint8_t *unused0, con AV_WN16(dst + i * 2, AV_RL16(src +
> i * 4) >> shift);         \ }
>  
> -y21xle_wrapper(10, 6);
> -y21xle_wrapper(12, 4);
> +y21xle_wrapper(10, 6)
> +y21xle_wrapper(12, 4)
>  
>  static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, const
> uint8_t *unused1, const uint8_t *unused2, int width, uint32_t
> *unused, void *opq) @@ -828,9 +828,9 @@ static void
> nv21ToUV_c(uint8_t *dstU, uint8_t *dstV, }
>                                         \ p01x_uv_wrapper(bits, shift)
>  
> -p01x_wrapper(10, 6);
> -p01x_wrapper(12, 4);
> -p01x_uv_wrapper(16, 0);
> +p01x_wrapper(10, 6)
> +p01x_wrapper(12, 4)
> +p01x_uv_wrapper(16, 0)
>  
>  #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
>  

Thanks for catching this. LGTM.

--phil
diff mbox series

Patch

diff --git a/libswscale/input.c b/libswscale/input.c
index be8f3940e1..88e318e664 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -583,8 +583,8 @@  static void yvy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
             AV_WN16(dst + i * 2, AV_RL16(src + i * 4) >> shift);         \
     }
 
-y21xle_wrapper(10, 6);
-y21xle_wrapper(12, 4);
+y21xle_wrapper(10, 6)
+y21xle_wrapper(12, 4)
 
 static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused1, const uint8_t *unused2, int width,
                        uint32_t *unused, void *opq)
@@ -828,9 +828,9 @@  static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV,
     }                                                                    \
     p01x_uv_wrapper(bits, shift)
 
-p01x_wrapper(10, 6);
-p01x_wrapper(12, 4);
-p01x_uv_wrapper(16, 0);
+p01x_wrapper(10, 6)
+p01x_wrapper(12, 4)
+p01x_uv_wrapper(16, 0)
 
 #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))