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

Alan Coopersmith alan.coopersmith at oracle.com
Sat Apr 9 18:00:06 UTC 2016


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);
                                 ^

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);
 }
 
-- 
2.7.4



More information about the Libva mailing list