mirror of
https://github.com/NixOS/nix
synced 2025-07-02 21:51:50 +02:00
Fix some random -Wconversion warnings
This commit is contained in:
parent
548ad391d9
commit
53ec5ac69f
16 changed files with 82 additions and 80 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue