From: Pasi Kallinen Date: Thu, 12 Mar 2015 15:57:13 +0000 (+0200) Subject: Fix warnings X-Git-Tag: NetHack-3.6.0_RC01~609 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=400d842a8febb7c4e450424f372c78b832cc8547;p=nethack Fix warnings --- diff --git a/include/extern.h b/include/extern.h index 0bd3aab7b..f382c4f7a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1582,6 +1582,7 @@ E int NDECL(dowhatdoes); E char *FDECL(dowhatdoes_core,(CHAR_P, char *)); E int NDECL(dohelp); E int NDECL(dohistory); +E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *, const char **)); E int FDECL(do_look, (int, coord *)); /* ### pcmain.c ### */ diff --git a/src/do_name.c b/src/do_name.c index ce538adb4..f1960b6ff 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -96,7 +96,7 @@ const char *goal; coord cc; int sym = 0; char tmpbuf[BUFSZ]; - char *firstmatch = NULL; + const char *firstmatch = NULL; cc.x = cx; cc.y = cy; if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) { diff --git a/src/pager.c b/src/pager.c index af36ba6e0..bb1c82e72 100644 --- a/src/pager.c +++ b/src/pager.c @@ -454,16 +454,15 @@ const char **firstmatch; boolean hit_trap; const char *x_str; static const char *mon_interior = "the interior of a monster"; - struct permonst *pm = NULL; if (looked) { - int oc, so; + int oc; unsigned os; glyph = glyph_at(cc.x,cc.y); /* Convert the glyph at the selected position to a symbol. */ - so = mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); + (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); } if (looked) @@ -642,7 +641,7 @@ const char **firstmatch; char monbuf[BUFSZ]; char temp_buf[BUFSZ]; - pm = lookat(cc.x, cc.y, look_buf, monbuf); + (void) lookat(cc.x, cc.y, look_buf, monbuf); *firstmatch = look_buf; if (*(*firstmatch)) { Sprintf(temp_buf, " (%s)", *firstmatch); @@ -685,7 +684,6 @@ do_look(mode, click_cc) coord cc; /* screen pos of unknown glyph */ boolean save_verbose; /* saved value of flags.verbose */ boolean from_screen; /* question from the screen */ - static const char *mon_interior = "the interior of a monster"; if (!clicklook) { if (quick) { @@ -730,8 +728,6 @@ do_look(mode, click_cc) out_str[0] = '\0'; if (from_screen || clicklook) { - int oc, so; - unsigned os; if (from_screen) { if (flags.verbose) pline("Please move the cursor to %s.",