On Mon, Apr 04, 2011 at 02:42:18PM -0600, Eric Blake wrote:
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?
It has existed since gcc 2.4, so IMHO that is so old we don't need
the check
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|