aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2015-03-09 07:58:10 +0100
committerSimon Tatham <anakin@pobox.com>2015-03-09 18:03:20 +0000
commitffe0aa6a114e83649bb04ff8e09b8025be988de2 (patch)
tree7c2c3c534afa8d85e3c8cdc59e1dea88d0f03dc5
parentf1e68fb516b5a8e83a9a2c923424313d0098a728 (diff)
downloadpuzzles-ffe0aa6a114e83649bb04ff8e09b8025be988de2.zip
puzzles-ffe0aa6a114e83649bb04ff8e09b8025be988de2.tar.gz
puzzles-ffe0aa6a114e83649bb04ff8e09b8025be988de2.tar.bz2
puzzles-ffe0aa6a114e83649bb04ff8e09b8025be988de2.tar.xz
Fix a build failure on x32 (time_t printfs).
As that architecture has 64-bit time_t but only 32-bit longs, printf format causes a warning. Enter -Werror...
-rw-r--r--magnets.c2
-rw-r--r--signpost.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/magnets.c b/magnets.c
index 815f016..5437c61 100644
--- a/magnets.c
+++ b/magnets.c
@@ -2562,7 +2562,7 @@ int main(int argc, const char *argv[])
goto done;
}
s = new_game(NULL, p, desc);
- printf("%s:%s (seed %ld)\n", id, desc, seed);
+ printf("%s:%s (seed %ld)\n", id, desc, (long)seed);
if (aux) {
/* We just generated this ourself. */
if (verbose || print) {
diff --git a/signpost.c b/signpost.c
index e89a7c6..5650b2b 100644
--- a/signpost.c
+++ b/signpost.c
@@ -2393,7 +2393,7 @@ int main(int argc, const char *argv[])
}
}
- sprintf(newseed, "%lu", time(NULL));
+ sprintf(newseed, "%lu", (unsigned long) time(NULL));
seedstr = dupstr(newseed);
if (id || !stdin_desc) {