From d015cbec157fa913e58e67f29e55b0805de2df53 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 21 Jun 2016 14:14:54 +0300 Subject: [PATCH] Silence some compiler warnings --- include/mondata.h | 2 +- src/mhitm.c | 2 +- src/mhitu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mondata.h b/include/mondata.h index fa7aa9006..229617782 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -194,7 +194,7 @@ || ((ptr)->mlet == S_PUDDING && (ptr) != &mons[PM_BLACK_PUDDING])) #define befriend_with_obj(ptr, obj) \ - ((obj)->oclass == FOOD_CLASS && is_domestic(ptr) \ + (((obj)->oclass == FOOD_CLASS && is_domestic(ptr)) \ || ((obj)->otyp == BANANA && \ ((ptr) == &mons[PM_MONKEY] \ || (ptr) == &mons[PM_APE]))) diff --git a/src/mhitm.c b/src/mhitm.c index 2f734978f..6f9281960 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -293,7 +293,7 @@ register struct monst *magr, *mdef; { int i, /* loop counter */ tmp, /* amour class difference */ - strike, /* hit this attack */ + strike = 0, /* hit this attack */ attk, /* attack attempted this time */ struck = 0, /* hit at least once */ res[NATTK]; /* results of all attacks */ diff --git a/src/mhitu.c b/src/mhitu.c index 0be49f42e..e07718fda 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -349,7 +349,7 @@ mattacku(mtmp) register struct monst *mtmp; { struct attack *mattk, alt_attk; - int i, j, tmp, sum[NATTK]; + int i, j = 0, tmp, sum[NATTK]; struct permonst *mdat = mtmp->data; boolean ranged = (distu(mtmp->mx, mtmp->my) > 3); /* Is it near you? Affects your actions */ -- 2.40.0