aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee')
-rw-r--r--contrib/epee/include/net/http_base.h1
-rw-r--r--contrib/epee/include/serialization/wire/write.h9
-rw-r--r--contrib/epee/include/storages/portable_storage_from_bin.h2
-rw-r--r--contrib/epee/src/http_auth.cpp6
4 files changed, 13 insertions, 5 deletions
diff --git a/contrib/epee/include/net/http_base.h b/contrib/epee/include/net/http_base.h
index 15fd30bf3..b53766780 100644
--- a/contrib/epee/include/net/http_base.h
+++ b/contrib/epee/include/net/http_base.h
@@ -34,6 +34,7 @@
#include <string>
#include <utility>
#include <list>
+#include <stdint.h>
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.http"
diff --git a/contrib/epee/include/serialization/wire/write.h b/contrib/epee/include/serialization/wire/write.h
index c18f7dbcc..c2359918c 100644
--- a/contrib/epee/include/serialization/wire/write.h
+++ b/contrib/epee/include/serialization/wire/write.h
@@ -30,6 +30,7 @@
#include <boost/utility/string_ref.hpp>
#include <boost/range/size.hpp>
#include <cstdint>
+#include <iterator>
#include <system_error>
#include <type_traits>
@@ -188,7 +189,13 @@ namespace wire_write
template<typename T>
inline std::size_t array_size(std::true_type, const T& source)
- { return boost::size(source); }
+ {
+ static_assert(
+ !std::is_same<typename std::iterator_traits<typename T::const_iterator>::iterator_category, std::input_iterator_tag>{},
+ "Input iterators must use json (or similar) derived classes directly"
+ );
+ return boost::size(source);
+ }
template<typename T>
inline constexpr std::size_t array_size(std::false_type, const T&) noexcept
diff --git a/contrib/epee/include/storages/portable_storage_from_bin.h b/contrib/epee/include/storages/portable_storage_from_bin.h
index b0af022f5..9fcaf5d01 100644
--- a/contrib/epee/include/storages/portable_storage_from_bin.h
+++ b/contrib/epee/include/storages/portable_storage_from_bin.h
@@ -231,6 +231,7 @@ namespace epee
default:
CHECK_AND_ASSERT_THROW_MES(false, "unknown entry_type code = " << type);
}
+ return read_ae<int8_t>(); // unreachable, dummy return to avoid compiler warning
}
inline
@@ -322,6 +323,7 @@ namespace epee
default:
CHECK_AND_ASSERT_THROW_MES(false, "unknown entry_type code = " << ent_type);
}
+ return read_se<int8_t>(); // unreachable, dummy return to avoid compiler warning
}
inline
void throwable_buffer_reader::read(section& sec)
diff --git a/contrib/epee/src/http_auth.cpp b/contrib/epee/src/http_auth.cpp
index 5071d2685..d6de6a0e1 100644
--- a/contrib/epee/src/http_auth.cpp
+++ b/contrib/epee/src/http_auth.cpp
@@ -217,15 +217,13 @@ namespace
//// Digest Authentication
template<typename Digest>
- typename std::result_of<Digest()>::type generate_a1(
- Digest digest, const http::login& creds, const boost::string_ref realm)
+ auto generate_a1(Digest digest, const http::login& creds, const boost::string_ref realm)
{
return digest(creds.username, u8":", realm, u8":", creds.password);
}
template<typename Digest>
- typename std::result_of<Digest()>::type generate_a1(
- Digest digest, const http::http_client_auth::session& user)
+ auto generate_a1(Digest digest, const http::http_client_auth::session& user)
{
return generate_a1(std::move(digest), user.credentials, user.server.realm);
}