[Pkg-gnupg-commit] [gnupg2] 66/116: libdns: Silence -Wstrict-prototypes on some function ptrs.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Jan 24 04:40:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 97372b39cd9b4c84a083eadbf072fff77799617f
Author: Werner Koch <wk at gnupg.org>
Date: Thu Jan 12 09:22:14 2017 +0100
libdns: Silence -Wstrict-prototypes on some function ptrs.
* dirmngr/dns.c (dns_rrtype): Ignore -Wstrict-prototypes warning.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
dirmngr/dns.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dirmngr/dns.c b/dirmngr/dns.c
index b580e40..016ff44 100644
--- a/dirmngr/dns.c
+++ b/dirmngr/dns.c
@@ -4246,6 +4246,15 @@ size_t dns_txt_print(void *_dst, size_t lim, struct dns_txt *txt) {
} /* dns_txt_print() */
+/* Some of the function pointers of DNS_RRTYPES are initialized with
+ * slighlly different fucntions, thus we can't use prototypes. */
+DNS_PRAGMA_PUSH
+#if __clang__
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
+#elif DNS_GNUC_PREREQ(4,6,0)
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
static const struct dns_rrtype {
enum dns_type type;
const char *name;
@@ -4271,6 +4280,10 @@ static const struct dns_rrtype {
{ DNS_T_AXFR, "AXFR", 0, 0, 0, 0, 0, 0, },
}; /* dns_rrtypes[] */
+DNS_PRAGMA_POP /*(-Wstrict-prototypes)*/
+
+
+
static const struct dns_rrtype *dns_rrtype(enum dns_type type) {
const struct dns_rrtype *t;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list