[Spice-devel] [PATCH spice-server] Add and use a SPICE_VERIFY macro for RHEL6 compatibility
Christophe Fergeau
cfergeau at redhat.com
Mon Nov 14 16:29:11 UTC 2016
On Mon, Nov 14, 2016 at 03:11:31PM +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.
> diff --git a/server/red-common.h b/server/red-common.h
> index 190fd9c..a457ed8 100644
> --- a/server/red-common.h
> +++ b/server/red-common.h
> @@ -80,4 +80,6 @@ typedef struct GListIter {
> #define GLIST_FOREACH_REVERSED(_list, _iter, _type, _data) \
> GLIST_FOREACH_GENERIC(_list, _iter, _type, _data, prev)
>
> +#define SPICE_VERIFY(cond) verify_expr(cond, (void)0)
> +
> #endif
Bit of a nitpick here, but I'd return 1 rather than 0, and I'd put the
macro somewhere in spice-common as verify.h is there.
Looks good otherwise.
Christophe
-------------- 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/0ca56970/attachment.sig>
More information about the Spice-devel
mailing list