From: | "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx> |
Date: | Mon, 3 Jan 2005 10:54:12 +0100 |
Anyways. Will be a bit more agressive in the future instead of just adding casts. The idea was to be conservative in that the reason for the original choice for the size and/or signedness of a variable may be important but not necessarily readily apparant. So addings casts felt less intrusive. In hindsight that was probably not a good idea.Actually, only one of them turned out to be problematic - I was wrong about the loop variables in this instance, as many were counting down (to below 0) as were counting up...
You're right about the underlying cause - there are a lot of variables where it doesn't make sense for them ever to be negative (block size, for instance), but they're all declared as plain ints. This might be because that's how they're stored on disk - or not - either way it will be non-trivial to fix this correctly. The casts are good enough for now, I think, so unless someone says otherwise, I'll commit this in a day or so.
cheers simon
-- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News
Attachment:
PGP.sig
Description: This is a digitally signed message part