From: Marko Kreen Date: Fri, 12 Feb 2016 13:34:41 +0000 (+0200) Subject: Fix some format warnings under win64 X-Git-Tag: pgbouncer_1_7_1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8196234c23b2c3482c3d0d128dc2ec8ee75ca01;p=pgbouncer Fix some format warnings under win64 --- diff --git a/src/util.c b/src/util.c index 986baed..d1b3d1e 100644 --- a/src/util.c +++ b/src/util.c @@ -407,7 +407,7 @@ const char *pga_str(const PgAddr *a, char *dst, int dstlen) if (pga_family(a) == AF_INET6) { snprintf(dst, dstlen, "[%s]:%d", buf, pga_port(a)); } else if (pga_family(a) == AF_UNIX && a->scred.pid) { - snprintf(dst, dstlen, "%s:%d$%u", buf, pga_port(a), a->scred.pid); + snprintf(dst, dstlen, "%s:%d$%lu", buf, pga_port(a), (unsigned long)a->scred.pid); } else { snprintf(dst, dstlen, "%s:%d", buf, pga_port(a)); } @@ -434,7 +434,7 @@ const char *pga_details(const PgAddr *a, char *dst, int dstlen) if (pga_family(a) == AF_INET6) { snprintf(dst, dstlen, "[%s]:%d", buf, pga_port(a)); } else if (pga_family(a) == AF_UNIX && a->scred.pid) { - snprintf(dst, dstlen, "%s(%u@%s):%d", buf, a->scred.pid, cached_hostname(), pga_port(a)); + snprintf(dst, dstlen, "%s(%lu@%s):%d", buf, (unsigned long)a->scred.pid, cached_hostname(), pga_port(a)); } else { snprintf(dst, dstlen, "%s:%d", buf, pga_port(a)); }