Unfortuantly I am not using a sh_int, restrictrace is set to unsigned
long int.

restrictrace is used in the macro IS_RESTRICT_RACE..

#define IS_RESTRICT_RACE(obj, which)
(IS_SET((obj)->restrictrace,(which)))


Anything else to check?

KJM



> -----Original Message-----
> From: Dennis [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 30, 2003 4:01 PM
> To: Mervine, Keith
> Cc: [email protected]
> Subject: Re: Quick question about warning....
> 
> 
> 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