From: ian Date: Mon, 3 Apr 2006 22:41:14 +0000 (+0000) Subject: Correct type of various printf arguments: ptrdiff_t != int X-Git-Tag: wip.base.getaddrinfo~77 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=c2180d3ea35c927a38165d149bfe18f57fe6b99e;hp=2b3230ff7cc8a5dff5947ab1dfa46808da2df49d Correct type of various printf arguments: ptrdiff_t != int --- diff --git a/changelog b/changelog index 3696709..b2780f7 100644 --- 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 diff --git a/client/adnslogres.c b/client/adnslogres.c index 456f3c5..98e2c32 100644 --- a/client/adnslogres.c +++ b/client/adnslogres.c @@ -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 #include @@ -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"); diff --git a/src/setup.c b/src/setup.c index 21aded0..0134680 100644 --- a/src/setup.c +++ b/src/setup.c @@ -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++;