On 04/04/2011 10:20 AM, Daniel P. Berrange wrote:
* src/internal.h: Define a ATTRIBUTE_NO_RETURN annotation
* src/lxc/lxc_container.c: Annotate lxcContainerDummyChild
with ATTRIBUTE_NO_RETURN
* tests/eventtest.c: Mark async thread as ATTRIBUTE_NO_RETURN
* m4/virt-compile-warnings.m4: Enable -Wmissing-noreturn
---
m4/virt-compile-warnings.m4 | 1 -
src/internal.h | 9 +++++++++
src/lxc/lxc_container.c | 3 ++-
tests/eventtest.c | 3 +--
4 files changed, 12 insertions(+), 4 deletions(-)
+++ b/src/internal.h
@@ -117,6 +117,15 @@
# endif
/**
+ * ATTRIBUTE_NORETURN:
+ *
+ * Macro to indicate that a function won't return to the caller
+ */
+# ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
+# endif
Do we need a minimum gcc version detection, so this cause grief on older
setups?
At any rate, ACK.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org