From: Ian Jackson Date: Sat, 4 Jul 2009 00:24:28 +0000 (+0100) Subject: Merge branch 'twomack' X-Git-Tag: 1.9.2~48 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=f23577a2c5659be8d42d87da85a6a62beb80cd3c;hp=cec9583fe97a74a44625e63cfa22318db2699ee4 Merge branch 'twomack' --- diff --git a/pctb/pages.c b/pctb/pages.c index b3ddceb..f9ca6e0 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -621,7 +621,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, @@ -684,7 +684,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 bf4fcbd..1f3c743 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -689,7 +689,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);