[Spice-commits] common/macros.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Nov 14 17:19:30 UTC 2016


 common/macros.h |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 31819a24248ba5311e7293ddac519b8134e67fa0
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Nov 14 16:51:04 2016 +0000

    Define a new SPICE_VERIFY macro
    
    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>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

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 */


More information about the Spice-commits mailing list