[Spice-devel] [spice-common 3/7] log: Use G_STATIC_ASSERT for spice_static_assert implementation
Jonathon Jongsma
jjongsma at redhat.com
Fri Nov 27 09:07:18 PST 2015
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Fri, 2015-11-27 at 16:47 +0100, Christophe Fergeau wrote:
> This is better than the runtime assertion we had.
> ---
> common/log.h | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/common/log.h b/common/log.h
> index 75daa56..3378e2a 100644
> --- a/common/log.h
> +++ b/common/log.h
> @@ -131,11 +131,8 @@ void spice_log(const char *log_domain,
> } G_STMT_END
> #endif
>
> -/* FIXME: improve that some day.. */
> #ifndef spice_static_assert
> -#define spice_static_assert(x) SPICE_STMT_START { \
> - spice_assert(x); \
> -} SPICE_STMT_END
> +#define spice_static_assert(x) G_STATIC_ASSERT(x)
> #endif
>
> SPICE_END_DECLS
More information about the Spice-devel
mailing list