]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4517 error: comparison between signed and unsigned integer
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 23 May 2016 23:20:27 +0000 (17:20 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 23 May 2016 23:20:27 +0000 (17:20 -0600)
commit0792f48915b745311fe66aa6389f450861a1df8d
tree0daa7e2847ce4da62fd4377cb121c0282cbd1afa
parent566c0b2b44bacdaafa6c7f6f8872825d8faefd48
Bug 4517 error: comparison between signed and unsigned integer

The old cast is required when size_t is unsigned (as it should be).
The new cast is required when size_t is signed (as it may be).

We could cast just the left-hand side to be signed instead, but it feels
slightly wrong to do that here because all values we are casting are
meant to be unsigned and, hence, in theory, might overflow in some
future version of the code if we cast them to a signed value now and
forget to fix that cast later while adding support for larger values.
src/fs/rock/RockIoState.cc
src/fs/ufs/UFSStoreState.cc