diff mbox series

[FFmpeg-devel,2/2] avcodec/cdtoons: Remove superfluous ;

Message ID 20200227053351.26785-2-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] avformat/ivfenc: Don't use size_t for size of file | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 27, 2020, 5:33 a.m. UTC
The second ; in a double ;; is actually a null statement. It triggers
the typical declaration-after-statement compiler-warnings if it occurs
in the middle of several declarations (like here).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/cdtoons.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fu, Linjie Feb. 27, 2020, 6:15 a.m. UTC | #1
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Andreas Rheinhardt
> Sent: Thursday, February 27, 2020 13:34
> To: ffmpeg-devel@ffmpeg.org
> Cc: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Remove
> superfluous ;
> 
> The second ; in a double ;; is actually a null statement. It triggers
> the typical declaration-after-statement compiler-warnings if it occurs
> in the middle of several declarations (like here).
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/cdtoons.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c
> index d5dce6351f..13f9a60f0f 100644
> --- a/libavcodec/cdtoons.c
> +++ b/libavcodec/cdtoons.c
> @@ -61,7 +61,7 @@ static int cdtoons_render_sprite(AVCodecContext
> *avctx, const uint8_t *data,
>  {
>      CDToonsContext *c = avctx->priv_data;
>      const uint8_t *next_line = data;
> -    const uint8_t *end = data + data_size;;
> +    const uint8_t *end = data + data_size;
>      uint16_t line_size;
>      uint8_t *dest;
>      int skip = 0, to_skip, x;
> --

lgtm, same issue exists in vf_cas.c maybe could be fixed in one commit.

libavfilter/vf_cas.c:61:        const int w1 = w - 1;;
libavfilter/vf_cas.c:128:        const int w1 = w - 1;;

- Linjie
Michael Niedermayer Feb. 28, 2020, 6:39 p.m. UTC | #2
On Thu, Feb 27, 2020 at 06:15:26AM +0000, Fu, Linjie wrote:
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> > Andreas Rheinhardt
> > Sent: Thursday, February 27, 2020 13:34
> > To: ffmpeg-devel@ffmpeg.org
> > Cc: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> > Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Remove
> > superfluous ;
> > 
> > The second ; in a double ;; is actually a null statement. It triggers
> > the typical declaration-after-statement compiler-warnings if it occurs
> > in the middle of several declarations (like here).
> > 
> > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> > ---
> >  libavcodec/cdtoons.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c
> > index d5dce6351f..13f9a60f0f 100644
> > --- a/libavcodec/cdtoons.c
> > +++ b/libavcodec/cdtoons.c
> > @@ -61,7 +61,7 @@ static int cdtoons_render_sprite(AVCodecContext
> > *avctx, const uint8_t *data,
> >  {
> >      CDToonsContext *c = avctx->priv_data;
> >      const uint8_t *next_line = data;
> > -    const uint8_t *end = data + data_size;;
> > +    const uint8_t *end = data + data_size;
> >      uint16_t line_size;
> >      uint8_t *dest;
> >      int skip = 0, to_skip, x;
> > --
> 
> lgtm, same issue exists in vf_cas.c maybe could be fixed in one commit.

will apply, dont see a reason why not to apply.

thx


[...]
diff mbox series

Patch

diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c
index d5dce6351f..13f9a60f0f 100644
--- a/libavcodec/cdtoons.c
+++ b/libavcodec/cdtoons.c
@@ -61,7 +61,7 @@  static int cdtoons_render_sprite(AVCodecContext *avctx, const uint8_t *data,
 {
     CDToonsContext *c = avctx->priv_data;
     const uint8_t *next_line = data;
-    const uint8_t *end = data + data_size;;
+    const uint8_t *end = data + data_size;
     uint16_t line_size;
     uint8_t *dest;
     int skip = 0, to_skip, x;