Archive > Bugs prior to release 2.3
24180 - Compile concerns
(1/1)
keybounce:
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
bayo:
Hello, i only check the line 1637:
x, y, z are int
crouchingState are byte
is byte type unsigned on Mac?
Koryon:
<<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?
Mattn:
oh... that warning was introduced by me. i'll ask duke and wilminator about it
Duke:
I got rid of the warnings ==> rev 24249.
Navigation
[0] Message Index
Go to full version