]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix warnings when compiling with clang 4380/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 30 Aug 2016 08:41:07 +0000 (10:41 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 30 Aug 2016 08:41:07 +0000 (10:41 +0200)
pdns/bpf-filter.cc
pdns/dnscrypt.hh

index 47a823434733c0d4be1db29db9b35a9efc6c0939..1b5b56a5ab7d2368044aed6fde21cf9600859584 100644 (file)
@@ -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<std::tuple<DNSName, uint16_t, uint64_t> > BPFFilter::getQNameStats()
   std::vector<std::tuple<DNSName, uint16_t, uint64_t> > result;
   std::unique_lock<std::mutex> 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);
index ae4607f69d75a9afe83a6031b2b6cb0aeb98bbd0..f680dc4c5f8a7179f47e75f46aa64df34faefac0 100644 (file)
@@ -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};
 };