OSDN Git Service

gcc suggests not putting ; at end of if statements
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 9 Apr 2016 18:00:06 +0000 (11:00 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 25 Apr 2016 02:15:39 +0000 (10:15 +0800)
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@oracle.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
va/x11/dri2_util.c

index d076fb3..1245432 100644 (file)
@@ -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);
 }