aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns.h
diff options
context:
space:
mode:
Diffstat (limited to 'dirmngr/dns.h')
-rw-r--r--dirmngr/dns.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/dirmngr/dns.h b/dirmngr/dns.h
index afc19a19a..024d6dcc8 100644
--- a/dirmngr/dns.h
+++ b/dirmngr/dns.h
@@ -132,19 +132,6 @@ DNS_PUBLIC int *dns_debug_p(void);
/*
* C O M P I L E R A N N O T A T I O N S
*
- * GCC with -Wextra, and clang by default, complain about overrides in
- * initializer lists. Overriding previous member initializers is well
- * defined behavior in C. dns.c relies on this behavior to define default,
- * overrideable member values when instantiating configuration objects.
- *
- * dns_quietinit() guards a compound literal expression with pragmas to
- * silence these shrill warnings. This alleviates the burden of requiring
- * third-party projects to adjust their compiler flags.
- *
- * NOTE: If you take the address of the compound literal, take the address
- * of the transformed expression, otherwise the compound literal lifetime is
- * tied to the scope of the GCC statement expression.
- *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#if defined __clang__
@@ -152,21 +139,15 @@ DNS_PUBLIC int *dns_debug_p(void);
#define DNS_PRAGMA_QUIET _Pragma("clang diagnostic ignored \"-Winitializer-overrides\"")
#define DNS_PRAGMA_POP _Pragma("clang diagnostic pop")
-#define dns_quietinit(...) \
- DNS_PRAGMA_PUSH DNS_PRAGMA_QUIET __VA_ARGS__ DNS_PRAGMA_POP
#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
#define DNS_PRAGMA_PUSH _Pragma("GCC diagnostic push")
#define DNS_PRAGMA_QUIET _Pragma("GCC diagnostic ignored \"-Woverride-init\"")
#define DNS_PRAGMA_POP _Pragma("GCC diagnostic pop")
-/* GCC parses the _Pragma operator less elegantly than clang. */
-#define dns_quietinit(...) \
- __extension__ ({ DNS_PRAGMA_PUSH DNS_PRAGMA_QUIET __VA_ARGS__; DNS_PRAGMA_POP })
#else
#define DNS_PRAGMA_PUSH
#define DNS_PRAGMA_QUIET
#define DNS_PRAGMA_POP
-#define dns_quietinit(...) __VA_ARGS__
#endif
#if defined __GNUC__
@@ -980,7 +961,6 @@ struct dns_hints_i {
} state;
}; /* struct dns_hints_i */
-#define dns_hints_i_new(...) (&(struct dns_hints_i){ __VA_ARGS__ })
DNS_PUBLIC unsigned dns_hints_grep(struct sockaddr **, socklen_t *, unsigned, struct dns_hints_i *, struct dns_hints *);