GNOME Bugzilla – Bug 668843
Fix a sign-compare warning
Last modified: 2012-01-27 20:14:54 UTC
See patch
Created attachment 206268 [details] [review] Fix a sign-compare warning We had if (signed < unsigned - unsigned) which had been 'fixed' to if (signed < (int)unsigned - unsigned) which didn't work because the subtraction between the two unsigned values caused the signed value to be promoted back to unsigned again. Change that to if (signed < (int) (unsigned - unsigned)) which means that the signed math will be done on the unsigned ints, but the result will properly be interpreted as being signed before doing the compare.
Attachment 206268 [details] pushed as 2a7f9d6 - Fix a sign-compare warning