Re: [PATCH 4/6] Enable use of -Wmissing-noreturn

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]