From 3c73c222da1a8621c0e91da7d959ccf4609ebaa8 Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 25 Jan 2008 16:47:50 +0000 Subject: [PATCH] linux warning bits (trunk only) a few syntactical tweaks to silence warnings from gcc on linux for code that was only updated in the trunk --- src/cmd.c | 2 +- src/hack.c | 2 +- src/hacklib.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 37547426c..3a845edb6 100644 --- 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; } diff --git a/src/hack.c b/src/hack.c index 0ca5f1aac..981d4f9c3 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1105,7 +1105,7 @@ struct trap *desttrap; /* nonnull if another trap at */ } break; default: - impossible("trapmove: stuck in unknown trap? (%s)", u.utraptype); + impossible("trapmove: stuck in unknown trap? (%d)", (int)u.utraptype); break; } return FALSE; diff --git a/src/hacklib.c b/src/hacklib.c index 7aa41e154..14e6e3aa2 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -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); -- 2.40.0