shithub: puzzles

Download patch

ref: ffe0aa6a114e83649bb04ff8e09b8025be988de2
parent: f1e68fb516b5a8e83a9a2c923424313d0098a728
author: Adam Borowski <kilobyte@angband.pl>
date: Mon Mar 9 03:58:10 EDT 2015

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...

--- a/magnets.c
+++ b/magnets.c
@@ -2562,7 +2562,7 @@
         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) {
--- a/signpost.c
+++ b/signpost.c
@@ -2393,7 +2393,7 @@
         }
     }
 
-    sprintf(newseed, "%lu", time(NULL));
+    sprintf(newseed, "%lu", (unsigned long) time(NULL));
     seedstr = dupstr(newseed);
 
     if (id || !stdin_desc) {