From 53e5892174c34c39d6d81db0c3263e2bb4c25dbb Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 30 Jun 1998 17:30:22 +0000 Subject: Fixed printf format errors. --- lib/libc/gen/getbsize.c | 2 +- lib/libc/net/ns_ntoa.c | 2 +- lib/libc/rpc/clnt_perror.c | 8 ++++---- lib/libc/rpc/netname.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libc/gen/getbsize.c b/lib/libc/gen/getbsize.c index fc7b123..a35ad72 100644 --- a/lib/libc/gen/getbsize.c +++ b/lib/libc/gen/getbsize.c @@ -88,7 +88,7 @@ fmterr: warnx("%s: unknown blocksize", p); break; } if (n > max) { - warnx("maximum blocksize is %dG", MAXB / GB); + warnx("maximum blocksize is %ldG", MAXB / GB); n = max; } if ((blocksize = n * mul) < 512) { diff --git a/lib/libc/net/ns_ntoa.c b/lib/libc/net/ns_ntoa.c index 0f01f0b..de5f305 100644 --- a/lib/libc/net/ns_ntoa.c +++ b/lib/libc/net/ns_ntoa.c @@ -53,7 +53,7 @@ ns_ntoa(addr) static char *spectHex(); net.net_e = addr.x_net; - sprintf(obuf, "%lx", ntohl(net.long_e)); + sprintf(obuf, "%lx", (u_long)ntohl(net.long_e)); cp = spectHex(obuf); cp2 = cp + 1; while (*up==0 && up < uplim) up++; diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 79baac2..d48bfa5 100644 --- a/lib/libc/rpc/clnt_perror.c +++ b/lib/libc/rpc/clnt_perror.c @@ -30,7 +30,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: clnt_perror.c,v 1.6 1996/12/30 14:19:34 peter Exp $"; +static char *rcsid = "$Id: clnt_perror.c,v 1.9 1997/05/28 05:05:04 wpaul Exp $"; #endif /* @@ -106,7 +106,7 @@ clnt_sperror(rpch, s) case RPC_VERSMISMATCH: (void) sprintf(str, "; low version = %lu, high version = %lu\n", - e.re_vers.low, e.re_vers.high); + (u_long)e.re_vers.low, (u_long)e.re_vers.high); break; case RPC_AUTHERROR: @@ -125,13 +125,13 @@ clnt_sperror(rpch, s) case RPC_PROGVERSMISMATCH: (void) sprintf(str, "; low version = %lu, high version = %lu\n", - e.re_vers.low, e.re_vers.high); + (u_long)e.re_vers.low, (u_long)e.re_vers.high); break; default: /* unknown */ (void) sprintf(str, "; s1 = %lu, s2 = %lu\n", - e.re_lb.s1, e.re_lb.s2); + (long)e.re_lb.s1, (long)e.re_lb.s2); break; } strstart[CLNT_PERROR_BUFLEN-2] = '\n'; diff --git a/lib/libc/rpc/netname.c b/lib/libc/rpc/netname.c index 3a3942b..22167be 100644 --- a/lib/libc/rpc/netname.c +++ b/lib/libc/rpc/netname.c @@ -101,7 +101,7 @@ user2netname(netname, uid, domain) if (strlen(domain) + 1 + MAXIPRINT > MAXNETNAMELEN) { return (0); } - (void) sprintf(netname, "%s.%ld@%s", OPSYS, uid, domain); + (void) sprintf(netname, "%s.%ld@%s", OPSYS, (u_long)uid, domain); return (1); } -- cgit v1.1