Fix one more batch of compiler warnings.

A few of these were potential bugs.
This commit is contained in:
John "Elwin" Edwards 2021-05-04 21:03:47 -04:00
parent 3dfd8fd09b
commit 06cad9ee1e
14 changed files with 30 additions and 27 deletions

View file

@ -770,12 +770,12 @@ wake_monster(int y, int x)
/*
* Every time he sees mean monster, it might start chasing him
*/
if (on(*tp, ISMEAN) &&
if ((on(*tp, ISMEAN) &&
off(*tp, ISHELD) &&
off(*tp, ISRUN) &&
rnd(100) > 33 &&
(!is_stealth(&player) || (on(*tp, ISUNIQUE) && rnd(100) > 95)) &&
(off(player, ISINVIS) || on(*tp, CANSEE)) ||
(off(player, ISINVIS) || on(*tp, CANSEE))) ||
(trp != NULL && (trp->r_flags & ISTREAS))) {
tp->t_dest = &hero;
turn_on(*tp, ISRUN);

View file

@ -1046,7 +1046,7 @@ void init_player(void);
void init_stones(void);
void init_terrain(void);
void init_things(void);
void init_weapon(struct object *weap, char type);
void init_weapon(struct object *weap, int type);
char *inv_name(struct object *obj, bool drop);
bool inventory(struct linked_list *list, int type);
bool is_current(struct object *obj);

View file

@ -140,7 +140,7 @@ hit_monster(int y, int x, struct object *obj, struct thing *tp)
*/
void
init_weapon(struct object *weap, char type)
init_weapon(struct object *weap, int type)
{
register struct init_weps *iwp;