UFO:Alien Invasion
Archive => Bugs prior to release 2.3 => Topic started by: keybounce on April 25, 2009, 06:13:51 pm
-
These compile warnings are concerning. This is on a PPC mac:
src/common/cmodel.c: In function ‘Grid_MoveMark’:
src/common/cmodel.c:1637: warning: comparison is always true due to limited range of data type
src/common/cmodel.c:1692: warning: comparison is always true due to limited range of data type
src/common/cmodel.c:1901: warning: comparison is always true due to limited range of data type
src/common/cmodel.c: In function ‘Grid_MoveCalc’:
src/common/cmodel.c:1960: warning: comparison is always true due to limited range of data type
src/common/cmodel.c: In function ‘Grid_MoveLength’:
src/common/cmodel.c:2017: warning: comparison is always true due to limited range of data type
-
Hello, i only check the line 1637:
x, y, z are int
crouchingState are byte
is byte type unsigned on Mac?
-
<<Intel Mac>>
I don't know where byte is being defined for this specific file, but grep -r " byte;" src/ does return that it is always defined as an unsigned char or uint8_t which in turn is always unisgned char.
So yes it's unsigned, and the asserts in all these lines will always be true. So I guess is it supposed to be unsigned?
-
oh... that warning was introduced by me. i'll ask duke and wilminator about it
-
I got rid of the warnings ==> rev 24249.