]> granicus.if.org Git - nethack/commitdiff
Fix warnings
authorPasi Kallinen <paxed@alt.org>
Thu, 12 Mar 2015 15:57:13 +0000 (17:57 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 12 Mar 2015 15:57:13 +0000 (17:57 +0200)
include/extern.h
src/do_name.c
src/pager.c

index 0bd3aab7bc0b5080d14f748727eb7d493f51e1f5..f382c4f7a5ac9cbc46f5994116194bf6b2330f1f 100644 (file)
@@ -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 ### */
index ce538adb4466b208bc2712c8ef8a0409a2811589..f1960b6ffc937949331b9efe768fb682bf1a458b 100644 (file)
@@ -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)) {
index af36ba6e0f59e06959e5a77ece790a3e5201d8df..bb1c82e72a9fa464ed2ed3b57312f4e9bce7947b 100644 (file)
@@ -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.",