chiark / gitweb /
Correct type of various printf arguments: ptrdiff_t != int
authorian <ian>
Mon, 3 Apr 2006 22:41:14 +0000 (22:41 +0000)
committerian <ian>
Mon, 3 Apr 2006 22:41:14 +0000 (22:41 +0000)
changelog
client/adnslogres.c
src/setup.c

index 36967093a5f89ae3f06dd3988f84f29c6f1683c6..b2780f7d77c6153f367f5fd488031116637f0876 100644 (file)
--- a/changelog
+++ b/changelog
@@ -3,6 +3,9 @@ adns (1.1.999.0.2); urgency=medium
   * Include reference to Peter Simons's Haskell bindings
     in README.html.
 
+  Patches from Bernd Eckenfels, the Debian maintainer:
+  * Correct type of various printf arguments: ptrdiff_t != int.
+
  --
 
 adns (1.1.999.0.1); urgency=medium
index 456f3c5b7312bc717b14181d0453884f9db30215..98e2c3250f360aa7d69adf176360e160f70ff770 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 static const char * const cvsid =
-       "$Id: adnslogres.c,v 1.20 2000/09/17 14:09:02 ian Exp $";
+       "$Id: adnslogres.c,v 1.21 2006/04/03 22:41:14 ian Exp $";
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -115,10 +115,10 @@ retry:
     }
   }
   sprintf(buf, "%.*s.%.*s.%.*s.%.*s.in-addr.arpa.",
-         ptrs[4]-ptrs[3]-1, ptrs[3],
-         ptrs[3]-ptrs[2]-1, ptrs[2],
-         ptrs[2]-ptrs[1]-1, ptrs[1],
-         ptrs[1]-ptrs[0]-1, ptrs[0]);
+         (int)(ptrs[4]-ptrs[3]-1), ptrs[3],
+         (int)(ptrs[3]-ptrs[2]-1), ptrs[2],
+         (int)(ptrs[2]-ptrs[1]-1), ptrs[1],
+         (int)(ptrs[1]-ptrs[0]-1), ptrs[0]);
   *addr= ptrs[0];
   *rest= ptrs[4]-1;
   return buf;
@@ -126,7 +126,7 @@ retry:
 
 static void printline(FILE *outf, char *start, char *addr, char *rest, char *domain) {
   if (domain)
-    fprintf(outf, "%.*s%s%s", addr - start, start, domain, rest);
+    fprintf(outf, "%.*s%s%s", (int)(addr - start), start, domain, rest);
   else
     fputs(start, outf);
   if (ferror(outf)) aargh("write output");
index 21aded08a4790f501716d90519790f159f6f4bff..0134680a125a57c99ab78227ddb5b180d7d43838 100644 (file)
@@ -426,7 +426,7 @@ static void readconfiggeneric(adns_state ads, const char *filename,
         ccip++);
     if (!ccip->name) {
       adns__diag(ads,-1,0,"%s:%d: unknown configuration directive `%.*s'",
-                filename,lno,q-p,p);
+                filename,lno,(int)(q-p),p);
       continue;
     }
     while (ctype_whitespace(*q)) q++;