[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 8/9] Require a semicolon for VIR_ONCE_GLOBAL_INIT calls



Add a dummy struct definition at the end of the macro, so
the compiler will require callers to add a semicolon.

Signed-off-by: Cole Robinson <crobinso redhat com>
---
 src/util/virthread.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virthread.h b/src/util/virthread.h
index d15dfc6a2d..218d1fcd3f 100644
--- a/src/util/virthread.h
+++ b/src/util/virthread.h
@@ -212,5 +212,6 @@ int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
  \
         return 0; \
     } \
+    struct classname ## EatSemicolon
 
 #endif /* LIBVIRT_VIRTHREAD_H */
-- 
2.20.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]