[FFmpeg-devel] [PATCH 2/2] avfilter/vf_overlay: Remove superfluous ;
Paul B Mahol
onemda at gmail.com
Fri Aug 21 14:32:33 EEST 2020
On 8/21/20, Andreas Rheinhardt <andreas.rheinhardt at gmail.com> wrote:
> In a function body, a redundant ; is just a null statement that does
> nothing. Yet outside a function body, a superfluous ';' like one that
> exists if one adds a ';' immediately after a function body's closing
> brace is actually invalid C that compilers happen to accept. Yet when
> compiled in -pedantic mode, both GCC as well as Clang emit warnings for
> this like "ISO C does not allow extra ‘;’ outside of a function
> [-Wpedantic]".
>
> The scenario described above existed in vf_overlay.c as a result of
> macro expansion. This commit fixes it.
>
LGTM
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavfilter/vf_overlay.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> index b3a1ac1a09..79c654bb2d 100644
> --- a/libavfilter/vf_overlay.c
> +++ b/libavfilter/vf_overlay.c
> @@ -595,8 +595,8 @@ static av_always_inline void
> blend_plane_##depth##_##nbits##bits(AVFilterContext
> dap += (1 << vsub) * dst->linesize[3] / bytes;
> \
> }
> \
> }
> -DEFINE_BLEND_PLANE(8, 8);
> -DEFINE_BLEND_PLANE(16, 10);
> +DEFINE_BLEND_PLANE(8, 8)
> +DEFINE_BLEND_PLANE(16, 10)
>
> #define DEFINE_ALPHA_COMPOSITE(depth, nbits)
> \
> static inline void alpha_composite_##depth##_##nbits##bits(const AVFrame
> *src, const AVFrame *dst, \
> @@ -647,8 +647,8 @@ static inline void
> alpha_composite_##depth##_##nbits##bits(const AVFrame *src, c
> sa += src->linesize[3] / bytes;
> \
> }
> \
> }
> -DEFINE_ALPHA_COMPOSITE(8, 8);
> -DEFINE_ALPHA_COMPOSITE(16, 10);
> +DEFINE_ALPHA_COMPOSITE(8, 8)
> +DEFINE_ALPHA_COMPOSITE(16, 10)
>
> #define DEFINE_BLEND_SLICE_YUV(depth, nbits)
> \
> static av_always_inline void
> blend_slice_yuv_##depth##_##nbits##bits(AVFilterContext *ctx,
> \
> @@ -679,8 +679,8 @@ static av_always_inline void
> blend_slice_yuv_##depth##_##nbits##bits(AVFilterCon
> alpha_composite_##depth##_##nbits##bits(src, dst, src_w, src_h,
> dst_w, dst_h, x, y, \
> jobnr, nb_jobs);
> \
> }
> -DEFINE_BLEND_SLICE_YUV(8, 8);
> -DEFINE_BLEND_SLICE_YUV(16, 10);
> +DEFINE_BLEND_SLICE_YUV(8, 8)
> +DEFINE_BLEND_SLICE_YUV(16, 10)
>
> static av_always_inline void blend_slice_planar_rgb(AVFilterContext *ctx,
> AVFrame *dst, const
> AVFrame *src,
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list