Re: [PATCH] qcow2: Silence clang -m32 compiler warning

2021-10-12 Thread Hanna Reitz
On 11.10.21 18:24, Eric Blake wrote: On Mon, Oct 11, 2021 at 05:50:31PM +0200, Hanna Reitz wrote: With -m32, size_t is generally only a uint32_t. That makes clang complain that in the assertion assert(qiov->size <= INT64_MAX); the range of the type of qiov->size (size_t) is too small for a

Re: [PATCH] qcow2: Silence clang -m32 compiler warning

2021-10-11 Thread Eric Blake
On Mon, Oct 11, 2021 at 05:50:31PM +0200, Hanna Reitz wrote: > With -m32, size_t is generally only a uint32_t. That makes clang > complain that in the assertion > > assert(qiov->size <= INT64_MAX); > > the range of the type of qiov->size (size_t) is too small for any of its > values to ever ex

[PATCH] qcow2: Silence clang -m32 compiler warning

2021-10-11 Thread Hanna Reitz
With -m32, size_t is generally only a uint32_t. That makes clang complain that in the assertion assert(qiov->size <= INT64_MAX); the range of the type of qiov->size (size_t) is too small for any of its values to ever exceed INT64_MAX. Cast qiov->size to uint64_t to silence clang. Fixes: f7ef