aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-22 10:37:43 +0200
committerregnat <rg@regnat.ovh>2020-09-22 10:39:29 +0200
commitc1e79f870cf548e81d7cab0d296c6e923da9fa8c (patch)
treea5dfecbb3a05ee5fe2239c43b8a4e288981caf71 /src/libutil
parentecc8672aa007af045d77434b495ca09541e9fee3 (diff)
Silence a compiler warning in serialise.hh
Explicitely cast to `uint64_t` in `readNum` to avoid a "comparison between signed and unsigned" warning
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/serialise.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index 6f4f4c855..7682a0f19 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -340,7 +340,7 @@ T readNum(Source & source)
((uint64_t) buf[6] << 48) |
((uint64_t) buf[7] << 56);
- if (n > std::numeric_limits<T>::max())
+ if (n > (uint64_t)std::numeric_limits<T>::max())
throw SerialisationError("serialised integer %d is too large for type '%s'", n, typeid(T).name());
return (T) n;