From: SHIRAKATA Kentaro Date: Thu, 16 Nov 2017 13:11:54 +0000 (+0900) Subject: eliminate warnings X-Git-Tag: v3.6.0-0.9~9 X-Git-Url: http://git.osdn.net/view?p=jnethack%2Fsource.git;a=commitdiff_plain;h=9cb23ea26fe57ac2161c5fbc52707dda1120d471 eliminate warnings --- diff --git a/src/apply.c b/src/apply.c index e018ec0..0ab5920 100644 --- a/src/apply.c +++ b/src/apply.c @@ -240,7 +240,9 @@ int rx, ry, *resp; { char buf[BUFSZ]; boolean more_corpses; +#if 0 /*JP*/ struct permonst *mptr; +#endif struct obj *corpse = sobj_at(CORPSE, rx, ry), *statue = sobj_at(STATUE, rx, ry); diff --git a/src/artifact.c b/src/artifact.c index f91dcb2..38c5dd3 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -986,7 +986,11 @@ boolean vis; /* whether the action can be seen */ char *hittee; /* target's name: "you" or mon_nam(mdef) */ { struct permonst *old_uasmon; +#if 0 /*JP*/ const char *verb, *fakename; +#else + const char *verb; +#endif boolean youattack = (magr == &youmonst), youdefend = (mdef == &youmonst), resisted = FALSE, do_stun, do_confuse, result; int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2; diff --git a/src/attrib.c b/src/attrib.c index 369a0f9..94bb78e 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -926,7 +926,9 @@ int propidx; /* special cases can have negative values */ static NEARDATA const char because_of[] = "%s‚É‚æ‚Á‚Ä"; if (propidx >= 0) { +#if 0 /*JP*/ char *p; +#endif struct obj *obj = (struct obj *) 0; int innate = is_innate(propidx); diff --git a/src/do.c b/src/do.c index 4e2289f..7f9737e 100644 --- a/src/do.c +++ b/src/do.c @@ -1819,7 +1819,9 @@ boolean at_stairs, falling, portal; #endif }; const char *mesg; +#if 0 /*JP*/ char buf[BUFSZ]; +#endif int which = rn2(4); if (Hallucination) diff --git a/src/eat.c b/src/eat.c index 3993284..b74b413 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1393,7 +1393,9 @@ struct obj *obj; int mnum; char *buf; { +#if 0 /*JP*/ char buf2[BUFSZ]; +#endif int r = tin_variety(obj, TRUE); if (obj && buf) { diff --git a/src/mhitu.c b/src/mhitu.c index 76c1ca6..f3b122a 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -718,7 +718,11 @@ register struct monst *mtmp; if (!rn2(10) && !mtmp->mcan) { int numseen, numhelp; +#if 0 /*JP*/ char buf[BUFSZ], genericwere[BUFSZ]; +#else + char genericwere[BUFSZ]; +#endif /*JP Strcpy(genericwere, "creature"); diff --git a/src/objnam.c b/src/objnam.c index 05d4952..22c50f4 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1080,9 +1080,11 @@ boolean with_price; boolean known, cknown, bknown, lknown; int omndx = obj->corpsenm; char prefix[PREFIX]; +#if 0 /*JP*/ char tmpbuf[PREFIX + 1]; /* for when we have to add something at the start of prefix instead of the end (Strcat is used on the end) */ +#endif register char *bp = xname(obj); #if 1 /*JP*//*‡˜“ü‚ê‘Ö‚¦‚ÉŽg‚¤*/ char preprefix[PREFIX]; @@ -3034,15 +3036,15 @@ struct obj *no_wish; int eroded, eroded2, erodeproof; int halfeaten, mntmp, contents; int islit, unlabeled, ishistoric, isdiluted, trapped; +#if 0 /*JP*/ int tmp, tinv, tvariety; +#else + int tvariety; +#endif int wetness; struct fruit *f; int ftype = context.current_fruit; char fruitbuf[BUFSZ]; -#if 1 /*JP*/ - char buf[BUFSZ]; - char pfx[BUFSZ]; -#endif /* Fruits may not mess up the ability to wish for real objects (since * you can leave a fruit in a bones file and it will be added to * another person's game), so they must be checked for last, after diff --git a/src/polyself.c b/src/polyself.c index e7b784b..2692853 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -541,7 +541,11 @@ int psflags; You("—Ø‚ÌŠZ‚ƈê‘̉»‚µ‚½D"); } else { /* dragon scale mail */ /* d.scale mail first reverts to scales */ +#if 0 /*JP*/ char *p, *dsmail; +#else + char *dsmail; +#endif /* similar to noarmor(invent.c), shorten to " scale mail" */ @@ -1183,7 +1187,11 @@ drop_weapon(alone) int alone; { struct obj *otmp; +#if 0 /*JP*/ const char *what, *which, *whichtoo; +#else + const char *which, *whichtoo; +#endif boolean candropwep, candropswapwep; if (uwep) { diff --git a/src/potion.c b/src/potion.c index c646e57..483ecbd 100644 --- a/src/potion.c +++ b/src/potion.c @@ -268,7 +268,9 @@ boolean talk; { long old = Blinded; boolean u_could_see, can_see_now; +#if 0 /*JP*/ const char *eyes; +#endif /* we need to probe ahead in case the Eyes of the Overworld are or will be overriding blindness */ diff --git a/src/role.c b/src/role.c index ffa0cac..ee5915b 100644 --- a/src/role.c +++ b/src/role.c @@ -1947,7 +1947,11 @@ int buflen, rolenum, racenum, gendnum, alignnum; */ const char *defprompt = "“K“–‚ɃLƒƒƒ‰ƒNƒ^[‚ð‘I‚ñ‚Å‚æ‚¢‚Å‚·‚©H[ynaq] "; int num_post_attribs = 0; +#if 0 /*JP*/ char tmpbuf[BUFSZ], *p; +#else + char tmpbuf[BUFSZ]; +#endif if (buflen < QBUFSZ) return (char *) defprompt; diff --git a/src/shk.c b/src/shk.c index 537a130..ddad293 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2690,7 +2690,11 @@ const char *fmt; /* "%s %ld %s %s", doname(obj), amt, plur(amt), arg */ long amt; const char *arg; { +#if 0 /*JP*/ char *obj_name, fmtbuf[BUFSZ]; +#else + char *obj_name; +#endif boolean was_unknown = !obj->dknown; obj->dknown = TRUE; @@ -3451,7 +3455,11 @@ xchar x, y; } } else { char qbuf[BUFSZ], qsfx[BUFSZ]; +#if 0 /*JP*/ boolean short_funds = (offer > shkmoney), one; +#else + boolean short_funds = (offer > shkmoney); +#endif if (short_funds) offer = shkmoney; diff --git a/src/steal.c b/src/steal.c index 8aab80c..b48dd9a 100644 --- a/src/steal.c +++ b/src/steal.c @@ -100,8 +100,10 @@ register struct monst *mtmp; register struct obj *fgold = g_at(u.ux, u.uy); register struct obj *ygold; register long tmp; +#if 0 /*JP*/ struct monst *who; const char *whose, *what; +#endif /* skip lesser coins on the floor */ while (fgold && fgold->otyp != GOLD_PIECE) diff --git a/src/topten.c b/src/topten.c index dbd1266..164a3b2 100644 --- a/src/topten.c +++ b/src/topten.c @@ -110,7 +110,9 @@ int how; /* PANICKED, TRICKED, QUIT, ESCAPED, ASCENDED */ "", "", "", "", "" }; +#if 0 /*JP*/ unsigned l; +#endif char *kname = killer.name; buf[0] = '\0'; /* so strncat() can find the end */ @@ -826,7 +828,11 @@ boolean so; { boolean second_line = TRUE; char linebuf[BUFSZ]; +#if 0 /*JP*/ char *bp, hpbuf[24], linebuf3[BUFSZ]; +#else + char *bp, hpbuf[24]; +#endif int hppos, lngr; #if 1 /*JP*/ char who[BUFSZ]; diff --git a/src/weapon.c b/src/weapon.c index 65fd604..d2ce35f 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -719,7 +719,9 @@ register struct monst *mon; */ if (mw_tmp && mwelded(mw_tmp)) { if (canseemon(mon)) { +#if 0 /*JP*/ char welded_buf[BUFSZ]; +#endif const char *mon_hand = mbodypart(mon, HAND); if (bimanual(mw_tmp)) diff --git a/src/wield.c b/src/wield.c index d28eb7f..420bbf6 100644 --- a/src/wield.c +++ b/src/wield.c @@ -483,7 +483,9 @@ struct obj *obj; const char *verb; /* "rub",&c */ { const char *what; +#if 0 /*JP*/ boolean more_than_1; +#endif if (obj == uwep) return TRUE; /* nothing to do if already wielding it */ diff --git a/src/write.c b/src/write.c index e35bb04..2e82397 100644 --- a/src/write.c +++ b/src/write.c @@ -100,7 +100,11 @@ dowrite(pen) register struct obj *pen; { register struct obj *paper; +#if 0 /*JP*/ char namebuf[BUFSZ], *nm, *bp; +#else + char namebuf[BUFSZ], *nm; +#endif register struct obj *new_obj; int basecost, actualcost; int curseval; diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 293b707..c390929 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -500,7 +500,7 @@ int ch2; attrs[0] = attrs[1] = attr; - WriteConsoleOutputAttribute(hConOut,&attrs,2, + WriteConsoleOutputAttribute(hConOut,(WORD *)(&attrs),2, cursor,&acount); WriteConsoleOutputCharacter(hConOut,buf,2, cursor,&ccount);