diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-05-02T11·56+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-05-02T11·56+0200 |
commit | 53ec5ac69f59ac435b18297a594933e83e236766 (patch) | |
tree | f50797b3f3338de1d471a9b6f3b3e377813f09c9 /src/libutil/serialise.hh | |
parent | 548ad391d96d8922d0f8c35b5dd72bf4fb7e3ed1 (diff) |
Fix some random -Wconversion warnings
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r-- | src/libutil/serialise.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh index d0b4552e3399..6e703c52a1e3 100644 --- a/src/libutil/serialise.hh +++ b/src/libutil/serialise.hh @@ -227,7 +227,7 @@ inline Sink & operator << (Sink & sink, uint64_t n) buf[4] = (n >> 32) & 0xff; buf[5] = (n >> 40) & 0xff; buf[6] = (n >> 48) & 0xff; - buf[7] = (n >> 56) & 0xff; + buf[7] = (unsigned char) (n >> 56) & 0xff; sink(buf, sizeof(buf)); return sink; } @@ -259,7 +259,7 @@ T readNum(Source & source) if (n > std::numeric_limits<T>::max()) throw SerialisationError("serialised integer %d is too large for type '%s'", n, typeid(T).name()); - return n; + return (T) n; } |