chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1e68fb
)
Fix a build failure on x32 (time_t printfs).
author
Adam Borowski
<kilobyte@angband.pl>
Mon, 9 Mar 2015 06:58:10 +0000
(07:58 +0100)
committer
Simon Tatham
<anakin@pobox.com>
Mon, 9 Mar 2015 18:03:20 +0000
(18:03 +0000)
As that architecture has 64-bit time_t but only 32-bit longs, printf format
causes a warning. Enter -Werror...
magnets.c
patch
|
blob
|
history
signpost.c
patch
|
blob
|
history
diff --git
a/magnets.c
b/magnets.c
index 815f016126641b38ab3ceb3eae5473f8585e9f6d..5437c61443979be0eddc0d3be38b27676c69a6c7 100644
(file)
--- 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 e89a7c6c62b733cc7c9641f9bf9c7b560671073f..5650b2b67309a7c6f31afdba9de6e912eb7e8c16 100644
(file)
--- 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) {