[Libva] [PATCH] gcc suggests not putting ; at end of if statements
Zhao Yakui
yakui.zhao at intel.com
Mon Apr 11 19:54:52 UTC 2016
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);
> }
>
More information about the Libva
mailing list