diff mbox series

[8/9] Require a semicolon for VIR_ONCE_GLOBAL_INIT calls

Message ID bf11e0d9ca1327ca91e7b3e7ef8ce1fb493bb7e8.1548283535.git.crobinso@redhat.com
State New
Headers show
Series Add semicolon to macro calls | expand

Commit Message

Cole Robinson Jan. 23, 2019, 10:46 p.m. UTC
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(+)

-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

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 */