diff options
author | Shane Kerr <shane@isc.org> | 2007-07-13 06:43:43 +0000 |
---|---|---|
committer | Shane Kerr <shane@isc.org> | 2007-07-13 06:43:43 +0000 |
commit | 28868515f6cb8ec3a78773391945ac89d555d65d (patch) | |
tree | 108b4801b3d3d019278281eb276288271480afe3 /minires | |
parent | 763cba6b918975315a644646137fec48e4953058 (diff) | |
download | isc-dhcp-28868515f6cb8ec3a78773391945ac89d555d65d.tar.gz |
Code cleanup to remove warnings from "gcc -Wall".
See RT ticket #16988 for more.
Diffstat (limited to 'minires')
-rw-r--r-- | minires/ns_date.c | 8 | ||||
-rw-r--r-- | minires/res_init.c | 4 | ||||
-rw-r--r-- | minires/res_mkupdate.c | 5 | ||||
-rw-r--r-- | minires/res_query.c | 6 | ||||
-rw-r--r-- | minires/res_update.c | 4 |
5 files changed, 14 insertions, 13 deletions
diff --git a/minires/ns_date.c b/minires/ns_date.c index 88e6b4c9..c24b2b74 100644 --- a/minires/ns_date.c +++ b/minires/ns_date.c @@ -22,7 +22,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_date.c,v 1.4 2007/05/29 18:11:56 each Exp $"; +static const char rcsid[] = "$Id: ns_date.c,v 1.5 2007/07/13 06:43:42 shane Exp $"; #endif /* Import. */ @@ -48,7 +48,7 @@ static const char rcsid[] = "$Id: ns_date.c,v 1.4 2007/05/29 18:11:56 each Exp $ /* Forward. */ -static int datepart(const unsigned char *, int, int, int, int *); +static int datepart(const char *, int, int, int, int *); /* Public. */ @@ -118,12 +118,12 @@ ns_datetosecs(const char *cp, int *errp) { * Don't reset the flag if there is no error. */ static int -datepart(const unsigned char *buf, int size, int min, int max, int *errp) { +datepart(const char *buf, int size, int min, int max, int *errp) { int result = 0; int i; for (i = 0; i < size; i++) { - if (!isdigit(buf[i])) + if (!isdigit((unsigned char)buf[i])) *errp = 1; result = (result * 10) + buf[i] - '0'; } diff --git a/minires/res_init.c b/minires/res_init.c index 00b303bd..bfcd60e9 100644 --- a/minires/res_init.c +++ b/minires/res_init.c @@ -76,7 +76,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.7 2007/05/29 18:11:56 each Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.8 2007/07/13 06:43:42 shane Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -154,7 +154,7 @@ res_ninit(res_state statp) { int minires_vinit(res_state statp, int preinit) { register FILE *fp; - register unsigned char *cp; + char *cp; register char **pp; register int n; char buf[BUFSIZ]; diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c index d47f8f8a..f8d84004 100644 --- a/minires/res_mkupdate.c +++ b/minires/res_mkupdate.c @@ -27,7 +27,7 @@ */ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_mkupdate.c,v 1.10 2007/05/19 19:16:25 dhankins Exp $"; +static const char rcsid[] = "$Id: res_mkupdate.c,v 1.11 2007/07/13 06:43:42 shane Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -109,7 +109,7 @@ res_nmkupdate(res_state statp, u_int16_t rtype, rclass; u_int32_t n1, rttl; u_char *dnptrs[20], **dpp, **lastdnptr; - unsigned siglen, certlen; + unsigned certlen; int keylen; unsigned buflen = *blp; u_char *buf = (unsigned char *)bp; @@ -483,6 +483,7 @@ res_nmkupdate(res_state statp, { int sig_type, success, dateerror; u_int32_t exptime, timesigned; + unsigned siglen; /* type */ if ((n = getword_str(buf2, sizeof buf2, diff --git a/minires/res_query.c b/minires/res_query.c index adc435ae..23ad1ed1 100644 --- a/minires/res_query.c +++ b/minires/res_query.c @@ -76,7 +76,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_query.c,v 1.6 2007/05/29 18:11:56 each Exp $"; +static const char rcsid[] = "$Id: res_query.c,v 1.7 2007/07/13 06:43:42 shane Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -396,7 +396,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { setbuf(fp, NULL); buf[sizeof(buf) - 1] = '\0'; while (fgets(buf, sizeof(buf), fp)) { - for (cp1 = buf; *cp1 && !isspace(*cp1); ++cp1) + for (cp1 = (unsigned char *)buf; *cp1 && !isspace(*cp1); ++cp1) ; if (!*cp1) break; @@ -409,7 +409,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { for (cp2 = cp1 + 1; *cp2 && !isspace(*cp2); ++cp2) ; *cp2 = '\0'; - strncpy(dst, cp1, siz - 1); + strncpy(dst, (char *)cp1, siz - 1); dst[siz - 1] = '\0'; fclose(fp); return (dst); diff --git a/minires/res_update.c b/minires/res_update.c index b16da1d5..d084e71b 100644 --- a/minires/res_update.c +++ b/minires/res_update.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/03/17 20:15:20 dhankins Exp $"; +static const char rcsid[] = "$Id: res_update.c,v 1.14 2007/07/13 06:43:42 shane Exp $"; #endif /* not lint */ /* @@ -88,7 +88,7 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in) { double answer[PACKETSZ / sizeof (double)]; double packet[2*PACKETSZ / sizeof (double)]; struct zonegrp *zptr, tgrp; - int nzones = 0, nscount = 0; + int nscount = 0; unsigned n; unsigned rval; struct sockaddr_in nsaddrs[MAXNS]; |