[Spice-devel] [PATCH spice-common] Define a new SPICE_VERIFY macro

Christophe Fergeau cfergeau at redhat.com
Mon Nov 14 17:04:21 UTC 2016


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Mon, Nov 14, 2016 at 04:55:22PM +0000, Frediano Ziglio wrote:
> The verify macro used currently has some problem
> as it raise a warning in RHEL6.
> As suggested in verify.h use verify_expr macro
> to avoid the warning.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  common/macros.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/macros.h b/common/macros.h
> index fe36929..1e3ded8 100644
> --- a/common/macros.h
> +++ b/common/macros.h
> @@ -19,6 +19,8 @@
>  #ifndef __MACROS_H
>  #define __MACROS_H
>  
> +#include "verify.h"
> +
>  #if    __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
>  #define SPICE_ATTR_NORETURN                                  \
>      __attribute__((noreturn))
> @@ -51,5 +53,6 @@
>  #error Please implement SPICE_CONSTRUCTOR_FUNC and SPICE_DESTRUCTOR_FUNC for this compiler
>  #endif
>  
> +#define SPICE_VERIFY(cond) verify_expr(cond, (void)1)
>  
>  #endif /* __MACROS_H */
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161114/f4cd6d07/attachment.sig>


More information about the Spice-devel mailing list