From 4166f6bc590840c3e92385df39ae4587bc24a766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 14 Jan 2022 10:34:43 +0000 Subject: [PATCH] examples: drop some conditionals checks from macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We no longer need to worry about GCC version older than 7.4.0. The other remaining conditionals checks were also overkill for the example code. In the unlikely event that someone tries to re-use the code in a scenario where further conditions apply they can figure out. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- examples/c/misc/event-test.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/c/misc/event-test.c b/examples/c/misc/event-test.c index 1eec76c79d..1165469a65 100644 --- a/examples/c/misc/event-test.c +++ b/examples/c/misc/event-test.c @@ -12,18 +12,8 @@ #define G_N_ELEMENTS(Array) (sizeof(Array) / sizeof(*(Array))) #define STREQ(a, b) (strcmp(a, b) == 0) #define NULLSTR(s) ((s) ? (s) : "") - -#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ - && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ - && !defined __cplusplus) -# define G_STATIC_ASSERT(cond) _Static_assert(cond, "verify (" #cond ")") -#else -# define G_STATIC_ASSERT(cond) -#endif - -#ifndef G_GNUC_UNUSED -# define G_GNUC_UNUSED __attribute__((__unused__)) -#endif +#define G_STATIC_ASSERT(cond) _Static_assert(cond, "verify (" #cond ")") +#define G_GNUC_UNUSED __attribute__((__unused__)) int run = 1;