]> granicus.if.org Git - nethack/commitdiff
linux warning bits (trunk only)
authorcohrs <cohrs>
Fri, 25 Jan 2008 16:47:50 +0000 (16:47 +0000)
committercohrs <cohrs>
Fri, 25 Jan 2008 16:47:50 +0000 (16:47 +0000)
a few syntactical tweaks to silence warnings from gcc on linux
for code that was only updated in the trunk

src/cmd.c
src/hack.c
src/hacklib.c

index 37547426cbb6e4e4a37c9e0df18659f9b1e404e9..3a845edb6b9f280e8bb83b7f07c6078991af1d9f 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1094,7 +1094,7 @@ char resultbuf[]; /* should be at least [7] to hold "18/100\0" */
            Sprintf(resultbuf, "%d", attrval);
        else if (attrval > STR18(100))  /* 19 to 25 */
            Sprintf(resultbuf, "%d", attrval - 100);
-       else    /* simplify "18/**" to be "18/100" */
+       else    /* simplify "18/ **" to be "18/100" */
            Sprintf(resultbuf, "18/%02d", attrval - 18);
        return resultbuf;
 }
index 0ca5f1aac02ff9ad3007288d8fae74d3aeae8e37..981d4f9c3bce236d54a6ee9cfd58b0ffc5f810e9 100644 (file)
@@ -1105,7 +1105,7 @@ struct trap *desttrap;    /* nonnull if another trap at <x,y> */
            }
            break;
     default:
-           impossible("trapmove: stuck in unknown trap? (%s)", u.utraptype);
+           impossible("trapmove: stuck in unknown trap? (%d)", (int)u.utraptype);
            break;
     }
     return FALSE;
index 7aa41e154fdb19c7c81f003e94825c5cf409a259..14e6e3aa2b6665e3c1c8b09fb29f2329c1a69ea4 100644 (file)
@@ -662,7 +662,7 @@ time_t date;
            datenum = (long)lt->tm_year + 2000L;
        else
            datenum = (long)lt->tm_year + 1900L;
-       Sprintf(datestr, "%04d%02d%02d%02d%02d%02d",
+       Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d",
                datenum, lt->tm_mon + 1, lt->tm_mday,
                lt->tm_hour, lt->tm_min, lt->tm_sec);
        return(datestr);