[Libva] [PATCH] gcc suggests not putting ; at end of if statements

Xiang, Haihao haihao.xiang at intel.com
Mon Apr 25 02:17:39 UTC 2016


Patch applied, thanks for your contribution.

Best Regards
Haihao

> On 04/10/2016 02:00 AM, Alan Coopersmith wrote:
> > dri2_util.c: In function 'dri2Close':
> > dri2_util.c:171:33: warning: suggest braces around empty body in an
> > 'if'
> >     statement [-Wempty-body]
> >       if (dri_state->base.fd>= 0);
> >                                   ^
> 
> Hi, Alan
> 
>      Thanks for your good catch.
> 
> reviewed-by: Zhao Yakui <yakui.zhao at intel.com>
> 
> Thanks
>     Yakui
> > 
> > Introduced-by: commit fffeffb8a78fffbb6a May 30 2011
> > Signed-off-by: Alan Coopersmith<alan.coopersmith at oracle.com>
> > ---
> >   va/x11/dri2_util.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
> > index d076fb3..1245432 100644
> > --- a/va/x11/dri2_util.c
> > +++ b/va/x11/dri2_util.c
> > @@ -168,7 +168,7 @@ dri2Close(VADriverContextP ctx)
> > 
> >       free_drawable_hashtable(ctx);
> > 
> > -    if (dri_state->base.fd>= 0);
> > +    if (dri_state->base.fd>= 0)
> >   	close(dri_state->base.fd);
> >   }
> > 
> 
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libva


More information about the Libva mailing list