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

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

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux