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...
This commit is contained in:
Adam Borowski
2015-03-09 07:58:10 +01:00
committed by Simon Tatham
parent f1e68fb516
commit ffe0aa6a11
2 changed files with 2 additions and 2 deletions

View File

@ -2562,7 +2562,7 @@ int main(int argc, const char *argv[])
goto done; goto done;
} }
s = new_game(NULL, p, desc); 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) { if (aux) {
/* We just generated this ourself. */ /* We just generated this ourself. */
if (verbose || print) { if (verbose || print) {

View File

@ -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); seedstr = dupstr(newseed);
if (id || !stdin_desc) { if (id || !stdin_desc) {