From aaed64039a40e7d1bc7a8907c53284506484aefb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Wed, 12 Oct 2016 15:02:02 -0400
Subject: [PATCH] dht: fix compilation on clang

---
 src/dht.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dht.cpp b/src/dht.cpp
index a803e664..25ff7bfd 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -278,7 +278,9 @@ struct Dht::SearchNode {
         if (node->isExpired())
             return false;
 
-        auto pending {false}, completed_sq_status {false}, pending_sq_status {false};
+        bool pending {false},
+             completed_sq_status {false},
+             pending_sq_status {false};
         for (const auto& s : getStatus) {
             if (s.second and s.second->pending())
                 pending = true;
@@ -1235,7 +1237,7 @@ void Dht::searchSendAnnounceValue(const std::shared_ptr<Search>& sr) {
                             auto& a = *ait;
                             const auto& type = getType(a.value->type);
                             if (sn->isSynced(now) and sn->getAnnounceTime(a.value->id, type) <= now) {
-                                auto hasValue {false};
+                                bool hasValue {false};
                                 uint16_t seq_no = 0;
                                 try {
                                     const auto& f = std::find_if(answer.fields.cbegin(), answer.fields.cend(),
-- 
GitLab