chiark / gitweb /
Compile fixes for amd64 according to Ian
authorTom Womack <fivemack@kolmogorov.(none)>
Fri, 3 Jul 2009 21:09:48 +0000 (22:09 +0100)
committerTom Womack <fivemack@kolmogorov.(none)>
Fri, 3 Jul 2009 21:09:48 +0000 (22:09 +0100)
pctb/pages.c
pctb/structure.c

index 482c959c24261cf541ca0ea4e99b63ddf7e51e4e..d93beff192ad340c1607e629fb42a45692c46653 100644 (file)
@@ -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
 
index fba7670a3b510e105dff978f1d21350928c0963f..5309489038bce03f9b3d1646d4357222a5d85e44 100644 (file)
@@ -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);