From 62c6511084ac851f374aaeb68b4d1d9f117690a1 Mon Sep 17 00:00:00 2001 From: Tom Womack Date: Fri, 3 Jul 2009 22:09:48 +0100 Subject: [PATCH] Compile fixes for amd64 according to Ian --- pctb/pages.c | 4 ++-- pctb/structure.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.30.2