]> granicus.if.org Git - zziplib/commit
zzip: fseeko: fix signedness mismatch with `file->avail`
authorPatrick Steinhardt <ps@pks.im>
Tue, 21 May 2019 11:19:39 +0000 (13:19 +0200)
committerPatrick Steinhardt <ps@pks.im>
Thu, 1 Aug 2019 06:33:34 +0000 (08:33 +0200)
commit7ee11c737fc470b22d156229cbd5795e2acb5f4c
tree16f8ba1a7935c4116eefd9659ec7b76dc56fc61c
parentda9a6f8a2a1c3d4a4d4958d4179dfc7add90235e
zzip: fseeko: fix signedness mismatch with `file->avail`

While the `avail` field of `struct zzip_entry_file` is of unsigned type
`zzip_size_t`, we assign it to a local variable of `zzip_off_t` in
`zzip_entry_fopen`, which is of signed type. This causes the compiler to
emit a warning due to signedness when comparing it with
`sizeof(file->buffer)`.

Fix this by using the correct type for the local variable.
zzip/fseeko.c