From 64267f0a9aaded6dad20ead686bf4da601a1977b Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 30 Aug 2016 10:41:07 +0200 Subject: [PATCH] dnsdist: Fix warnings when compiling with clang --- pdns/bpf-filter.cc | 6 +++--- pdns/dnscrypt.hh | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pdns/bpf-filter.cc b/pdns/bpf-filter.cc index 47a8234347..1b5b56a5ab 100644 --- a/pdns/bpf-filter.cc +++ b/pdns/bpf-filter.cc @@ -322,7 +322,7 @@ void BPFFilter::block(const DNSName& qname, uint16_t qtype) void BPFFilter::unblock(const DNSName& qname, uint16_t qtype) { - struct QNameKey key = { 0 }; + struct QNameKey key = { { 0 } }; std::string keyStr = qname.toDNSStringLC(); (void) qtype; @@ -397,8 +397,8 @@ std::vector > BPFFilter::getQNameStats() std::vector > result; std::unique_lock lock(d_mutex); - struct QNameKey key = {0}; - struct QNameKey nextKey = {0}; + struct QNameKey key = { { 0 } }; + struct QNameKey nextKey = { { 0 } }; struct QNameValue value; int res = bpf_get_next_key(d_qnamemap.fd, &key, &nextKey); diff --git a/pdns/dnscrypt.hh b/pdns/dnscrypt.hh index ae4607f69d..f680dc4c5f 100644 --- a/pdns/dnscrypt.hh +++ b/pdns/dnscrypt.hh @@ -172,7 +172,6 @@ private: DnsCryptPrivateKey privateKey; unsigned char publicKey[DNSCRYPT_PUBLIC_KEY_SIZE]; DnsCryptPrivateKey oldPrivateKey; - unsigned char oldPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE]; bool hasOldCert{false}; }; -- 2.47.2