From: Tom Womack Date: Fri, 3 Jul 2009 21:09:48 +0000 (+0100) Subject: Compile fixes for amd64 according to Ian X-Git-Tag: 1.9.2~48^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=62c6511084ac851f374aaeb68b4d1d9f117690a1 Compile fixes for amd64 according to Ian --- diff --git a/pctb/pages.c b/pctb/pages.c index 482c959..d93beff 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -628,7 +628,7 @@ static void findypp_recurse(int depth, int targetdepth, Window w) { static const char prefix[]= "Puzzle Pirates - "; static const char onthe[]= " on the "; static const char suffix[]= " ocean"; -#define S(x) (sizeof((x))-1) +#define S(x) ((int)sizeof((x))-1) debugfind("FINDYPP %d/%d screen %d %*s %lx", depth,targetdepth,screen, @@ -691,7 +691,7 @@ static void findypp_recurse(int depth, int targetdepth, Window w) { REQUIRE( !memcmp(spc1, onthe, S(onthe)) ); #define ASSIGN(what, start, end) \ - what= masprintf("%.*s", (end)-(start), start); \ + what= masprintf("%.*s", (int)((end)-(start)), start); \ if (o_##what) REQUIRE( !strcasecmp(o_##what, what) ); \ else diff --git a/pctb/structure.c b/pctb/structure.c index fba7670..5309489 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -692,7 +692,7 @@ void find_islandname(RgbImage *ri) { char *delim= strstr(archisland," - "); assert(delim); - archipelago= masprintf("%.*s", delim-archisland, archisland); + archipelago= masprintf("%.*s", (int)(delim-archisland), archisland); island= masprintf("%s", delim+3); free(ri);