On Tue, 29 Apr 2003, Mervine, Keith wrote:

> Greetings listers,
>
>       What does the following warning mean....
>
> gcc -c -g -Dlinux -O   handler.c
> handler.c: In function `can_wear_race':
> handler.c:2066: warning: comparison is always false due to limited range
> of data type

The warning means that this comparison is always false (it is impossible
for it to be true) because of the limited range of the data type used.

> 2066        if (IS_RESTRICT_RACE (obj, REST_RACE_GITHYANKI) && ch->race
> == RACE_GITHYANKI)
>         return TRUE;

You're using a short integer (16 bits), but REST_RACE_GITHYANKI is
more than 16 bits.  So when you're checking to see if the bit is set,
it's not.  (It doesn't even exist!  How can it be set?)


Dennis


Reply via email to