#define IS_RESTRICT_RACE(obj, which) (IS_SET((obj)->restrictrace,(which)))
KJM > -----Original Message----- > From: Jason Gauthier [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 29, 2003 5:26 PM > To: Mervine, Keith; '[email protected]' > Subject: RE: Quick question about warning.... > > > Let's see the IS_RESTRICT_RACE macro/function. > > Should help narrow it down. > > > -----Original Message----- > > From: Mervine, Keith [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, April 29, 2003 5:22 PM > > To: [email protected] > > Subject: Quick question about warning.... > > > > > > 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 > > handler.c:2068: warning: comparison is always false due to > > limited range of data type > > handler.c:2070: warning: comparison is always false due to > > limited range of data type > > handler.c:2072: warning: comparison is always false due to > > limited range of data type > > handler.c:2074: warning: comparison is always false due to > > limited range of data type > > handler.c:2076: warning: comparison is always false due to > > limited range of data type It is in reference to the > > following code...Ive numbered the appropriate lines. > > > > bool can_wear_race(CHAR_DATA *ch, OBJ_DATA *obj) > > { > > if (!obj->restrictrace) > > return TRUE; //no restrictions > > > > if (IS_RESTRICT_RACE (obj, REST_RACE_HUMAN) && ch->race == > > RACE_HUMAN) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_ELF) && ch->race == > > RACE_ELF) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_HALF_ELF) && > ch->race == > > RACE_HALF_ELF) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_DARK_ELF) && > ch->race == > > RACE_DARK_ELF) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_ROCKSEER) && > ch->race == > > RACE_ROCKSEER) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_DWARF) && ch->race == > > RACE_DWARF) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_SVIRFNEBLI) && > > ch->race == > > RACE_SVIRFNEBLI) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_DUERGAR) && ch->race == > > RACE_DUERGAR) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_ARIAL) && ch->race == > > RACE_ARIAL) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_GNOME) && ch->race == > > RACE_GNOME) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_STORM_GIANT) && > > ch->race == > > RACE_STORM_GIANT) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_CLOUD_GIANT) && > > ch->race == > > RACE_CLOUD_GIANT) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_FIRE_GIANT) && > > ch->race == > > RACE_FIRE_GIANT) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_FROST_GIANT) && > > ch->race == > > RACE_FROST_GIANT) > > return TRUE; > > if (IS_RESTRICT_RACE (obj, REST_RACE_TABAXI) && ch->race == > > RACE_TABAXI) > > return TRUE; > > 2066 if (IS_RESTRICT_RACE (obj, REST_RACE_GITHYANKI) > > && ch->race > > == RACE_GITHYANKI) > > return TRUE; > > 2068 if (IS_RESTRICT_RACE (obj, REST_RACE_SATYR) && > ch->race == > > RACE_SATYR) > > return TRUE; > > 2070 if (IS_RESTRICT_RACE (obj, REST_RACE_TROLL) && > ch->race == > > RACE_TROLL) > > return TRUE; > > 2072 if (IS_RESTRICT_RACE (obj, REST_RACE_ILLITHID) > && ch->race > > == RACE_ILLITHID) > > return TRUE; > > 2074 if (IS_RESTRICT_RACE (obj, REST_RACE_GITHZERAI) > > && ch->race > > == RACE_GITHZERAI) > > return TRUE; > > 2076 if (IS_RESTRICT_RACE (obj, REST_RACE_LIZARDMAN) > > && ch->race > > == RACE_LIZARDMAN) > > return TRUE; > > > > return FALSE; > > } > > > > > > > > Thanks. > > > > KJM > > > > -- > > ROM mailing list > > [email protected] > > http://www.rom.org/cgi-bin/mailman/listinfo/rom > > >

