fix clang compilation and warnings

This commit is contained in:
Adrien Béraud committed 2015-01-07 14:29:53 -05:00
1 parent 31bd66b4c1
commit f6b3c263b2
3 files changed
+5 -6

No files matched your search

+2 -2
View File
@@ -194,8 +194,8 @@ public:
int getNodesStats(sa_family_t af, unsigned *good_return, unsigned *dubious_return, unsigned *cached_return, unsigned *incoming_return) const;
std::string getStorageLog() const;
std::string getRoutingTablesLog(sa_family_t af) const;
std::string getSearchesLog(sa_family_t af) const;
std::string getRoutingTablesLog(sa_family_t) const;
std::string getSearchesLog(sa_family_t) const;
void dumpTables() const;
+1 -1
View File
@@ -115,7 +115,7 @@ private:
inline void NOLOG(char const*, va_list) {}
class Value;
struct Value;
typedef std::function<bool(InfoHash, std::shared_ptr<Value>&, InfoHash, const sockaddr*, socklen_t)> StorePolicy;
typedef std::function<bool(InfoHash, const std::shared_ptr<Value>&, std::shared_ptr<Value>&, InfoHash, const sockaddr*, socklen_t)> EditPolicy;
+2 -3
View File
@@ -768,7 +768,7 @@ Dht::searchStep(Search& sr)
TransId {TransPrefix::ANNOUNCE_VALUES, sr.tid}, sr.id, *a.value,
n.token, n.reply_time >= now - UDP_REPLY_TIME);
if (a_status == n.acked.end()) {
n.acked[vid] = { .request_time = now, .reply_time = TIME_INVALID };
n.acked[vid] = { now };
} else {
a_status->second.request_time = now;
}
@@ -1767,9 +1767,8 @@ Dht::getRoutingTablesLog(sa_family_t af) const
}
std::string
Dht::getSearchesLog(sa_family_t af) const
Dht::getSearchesLog(sa_family_t) const
{
auto& list = (af == AF_INET) ? buckets : buckets6;
std::stringstream out;
for (const auto& sr : searches)
dumpSearch(sr, out);