mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
examples: drop some conditionals checks from macros
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 <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
79f738c510
commit
4166f6bc59
@ -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) : "<null>")
|
||||
|
||||
#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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user