[Spice-devel] [protocol v2] macros: Remove unused SPICE_GNUC_XXX macros
Frediano Ziglio
fziglio at redhat.com
Mon Jun 24 12:58:48 UTC 2019
>
> We don't want to maintain more macros than necessary and these have
> been unused for over two years.
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Acked for me (I'll wait)
> ---
>
> v2: Remove unused macros altogether rather than marking them as
> deprecated (no use of them has been found in spice, spice-gtk,
> spice-common, spice-protocol, vd_agent and xf86-video-qxl in the
> past two years).
>
> spice/macros.h | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/spice/macros.h b/spice/macros.h
> index ab1d056..a23e866 100644
> --- a/spice/macros.h
> +++ b/spice/macros.h
> @@ -34,19 +34,11 @@
> #include <spice/types.h>
>
> #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
> -#define SPICE_GNUC_PURE __attribute__((__pure__))
> #define SPICE_GNUC_MALLOC __attribute__((__malloc__))
> #else
> -#define SPICE_GNUC_PURE
> #define SPICE_GNUC_MALLOC
> #endif
>
> -#if __GNUC__ >= 4
> -#define SPICE_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
> -#else
> -#define SPICE_GNUC_NULL_TERMINATED
> -#endif
> -
> #ifndef __has_feature
> #define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
> #endif
> @@ -62,20 +54,12 @@
>
> #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
> #define SPICE_GNUC_PRINTF( format_idx, arg_idx ) __attribute__((__format__
> (__printf__, format_idx, arg_idx)))
> -#define SPICE_GNUC_SCANF( format_idx, arg_idx ) __attribute__((__format__
> (__scanf__, format_idx, arg_idx)))
> -#define SPICE_GNUC_FORMAT( arg_idx ) __attribute__((__format_arg__
> (arg_idx)))
> #define SPICE_GNUC_NORETURN __attribute__((__noreturn__))
> -#define SPICE_GNUC_CONST __attribute__((__const__))
> #define SPICE_GNUC_UNUSED __attribute__((__unused__))
> -#define SPICE_GNUC_NO_INSTRUMENT __attribute__((__no_instrument_function__))
> #else /* !__GNUC__ */
> #define SPICE_GNUC_PRINTF( format_idx, arg_idx )
> -#define SPICE_GNUC_SCANF( format_idx, arg_idx )
> -#define SPICE_GNUC_FORMAT( arg_idx )
> #define SPICE_GNUC_NORETURN
> -#define SPICE_GNUC_CONST
> #define SPICE_GNUC_UNUSED
> -#define SPICE_GNUC_NO_INSTRUMENT
> #endif /* !__GNUC__ */
>
> #ifdef G_DEPRECATED
Frediano
More information about the Spice-devel
mailing list