Hi there. I have come accross a warning (compiles fine, just bothers me) in my class.c file in the invalid_class function. I have had a wierd experience with this section of the file because it used to give me wierd parse errors at the end of it, but i made changes that fixed it, and in my mind shouldn't have. Ok, here is the code i am currently using. /*************************************************************************** ***********/ int invalid_class(struct char_data *ch, struct obj_data *obj) { if ((IS_OBJ_STAT(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_MONK) && IS_MONK(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_ASSASSIN) && IS_ASSASSIN(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_PALADIN) && IS_PALADIN(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_BARD) && IS_BARD(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_DRUID) && IS_DRUID(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_HUMAN) && IS_HUMAN(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_ELF) && IS_ELF(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_GNOME) && IS_GNOME(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_DWARF) && IS_DWARF(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_PIXIE) && IS_PIXIE(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_OGRE) && IS_OGRE(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_GIANT) && IS_GIANT(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_ESRACE)) && (IS_ESRACE(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_SRACE)) && (IS_SRACE(ch))) || (IS_OBJ_STAT(obj, ITEM_ANTI_MRACE)) && (IS_MRACE(ch)))) || (IS_OBJ_STAT(obj, ITEM_ANTI_LRACE)) && (IS_LRACE(ch)))) return 1; else return 0; } /*************************************************************************** ********/ It gives me the following errors: class.c:665: warning: left shift count >= width of type class.c:666: warning: suggest parentheses around && within || class.c:667: warning: suggest parentheses around && within || class.c:668: warning: suggest parentheses around && within || class.c:669: warning: suggest parentheses around && within || I have tried using the right ammount of ()'s but it gives me some parsing errors. Chuck +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST