chiark / gitweb /
Merge branch 'twomack'
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Jul 2009 00:24:28 +0000 (01:24 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Jul 2009 00:24:28 +0000 (01:24 +0100)
pctb/pages.c
pctb/structure.c

index b3ddceba81f921c2dc1d46661053e77da3215680..f9ca6e05409874b37a3b0b27e38f852d396a9e99 100644 (file)
@@ -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
 
index bf4fcbd6399c496e0e800b3d05f5f16ad12d7129..1f3c743319de029d342bbdbaa9bce1ec920047cb 100644 (file)
@@ -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);