silence compiler warnings

This commit is contained in:
Mark Andrews 2004-09-16 01:02:20 +00:00
parent bdf47db44f
commit 6b2e48094d
7 changed files with 39 additions and 38 deletions

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.186.18.10 2004/09/06 06:23:47 marka Exp $ */
/* $Id: dig.c,v 1.186.18.11 2004/09/16 01:02:17 marka Exp $ */
#include <config.h>
#include <stdlib.h>
@ -1338,7 +1338,7 @@ getaddresses(dig_lookup_t *lookup, const char *host) {
isc_result_t result;
isc_sockaddr_t sockaddrs[DIG_MAX_ADDRESSES];
isc_netaddr_t netaddr;
unsigned int count, i;
int count, i;
dig_server_t *srv;
char tmp[ISC_NETADDR_FORMATSIZE];

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.259.18.5 2004/09/06 01:32:28 marka Exp $ */
/* $Id: dighost.c,v 1.259.18.6 2004/09/16 01:02:17 marka Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
@ -573,7 +573,7 @@ set_nameserver(char *opt) {
isc_result_t result;
isc_sockaddr_t sockaddrs[DIG_MAX_ADDRESSES];
isc_netaddr_t netaddr;
unsigned int count, i;
int count, i;
dig_server_t *srv;
char tmp[ISC_NETADDR_FORMATSIZE];

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.130.18.3 2004/06/17 01:42:36 marka Exp $ */
/* $Id: nsupdate.c,v 1.130.18.4 2004/09/16 01:02:18 marka Exp $ */
#include <config.h>
@ -627,7 +627,7 @@ parse_args(int argc, char **argv) {
exit(1);
}
if (timeout == 0)
timeout = ULONG_MAX;
timeout = UINT_MAX;
break;
case 'u':
result = isc_parse_uint32(&udp_timeout,
@ -637,7 +637,7 @@ parse_args(int argc, char **argv) {
exit(1);
}
if (udp_timeout == 0)
udp_timeout = ULONG_MAX;
udp_timeout = UINT_MAX;
break;
case 'r':
result = isc_parse_uint32(&udp_retries,

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getaddresses.c,v 1.15.18.1 2004/05/15 03:47:16 jinmei Exp $ */
/* $Id: getaddresses.c,v 1.15.18.2 2004/09/16 01:02:19 marka Exp $ */
#include <config.h>
#include <string.h>
@ -84,7 +84,7 @@ bind9_getaddresses(const char *hostname, in_port_t port,
isc_sockaddr_v6fromin(&addrs[0], &in4, port);
*addrcount = 1;
return (ISC_R_SUCCESS);
} else if (strlen(hostname) <= 127) {
} else if (strlen(hostname) <= 127U) {
char tmpbuf[128], *d;
isc_uint32_t zone = 0;

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: wks_11.c,v 1.51 2004/03/05 05:10:25 marka Exp $ */
/* $Id: wks_11.c,v 1.51.18.1 2004/09/16 01:02:19 marka Exp $ */
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
@ -107,7 +107,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
service[sizeof(service)-1] = '\0';
for (i = strlen(service) - 1; i >= 0; i--)
if (isupper(service[i]&0xff))
service[i] = tolower(service[i]);
service[i] = tolower(service[i]&0xff);
port = strtol(DNS_AS_STR(token), &e, 10);
if (*e == 0)

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: string.c,v 1.10 2004/03/18 02:58:06 marka Exp $ */
/* $Id: string.c,v 1.10.18.1 2004/09/16 01:02:19 marka Exp $ */
#include <config.h>
@ -60,7 +60,7 @@ isc_string_touint64(char *source, char **end, int base) {
tmp = 0;
while ((c = *s) != 0) {
c = tolower(c);
c = tolower(c&0xff);
/* end ? */
if ((o = strchr(digits, c)) == NULL) {
*end = s;

View file

@ -15,12 +15,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: print.c,v 1.2 2004/08/28 06:20:14 marka Exp $ */
/* $Id: print.c,v 1.2.2.2 2004/09/16 01:02:20 marka Exp $ */
#include <config.h>
#include <ctype.h>
#include <stdio.h> /* for sprintf */
#include <string.h>
#define LWRES__PRINT_SOURCE /* Used to get the lwres_print_* prototypes. */
@ -96,7 +97,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
while (*format != '\0') {
if (*format != '%') {
if (size > 1) {
if (size > 1U) {
*str++ = *format;
size--;
}
@ -170,7 +171,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
case '\0':
continue;
case '%':
if (size > 1) {
if (size > 1U) {
*str++ = *format;
size--;
}
@ -312,28 +313,28 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
count += strlen(head) + strlen(buf) + pad +
zeropad;
if (!left) {
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
}
}
cp = head;
while (*cp != '\0' && size > 1) {
while (*cp != '\0' && size > 1U) {
*str++ = *cp++;
size--;
}
while (zeropad > 0 && size > 1) {
while (zeropad > 0 && size > 1U) {
*str++ = '0';
size--;
zeropad--;
}
cp = buf;
while (*cp != '\0' && size > 1) {
while (*cp != '\0' && size > 1U) {
*str++ = *cp++;
size--;
}
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
@ -369,24 +370,24 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
}
count += pad + length;
if (!left)
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
}
if (precision != 0)
while (precision > 0 && *cp != '\0' &&
size > 1) {
size > 1U) {
*str++ = *cp++;
size--;
precision--;
}
else
while (*cp != '\0' && size > 1) {
while (*cp != '\0' && size > 1U) {
*str++ = *cp++;
size--;
}
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
@ -401,17 +402,17 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
*str++ = c;
size--;
}
while (width-- > 0 && size > 1) {
while (width-- > 0 && size > 1U) {
*str++ = ' ';
size--;
}
if (!left && size > 1) {
if (!left && size > 1U) {
*str++ = c;
size--;
}
} else {
count++;
if (size > 1) {
if (size > 1U) {
*str++ = c;
size--;
}
@ -430,7 +431,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
}
count += length + pad + zeropad;
if (!left)
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
@ -438,25 +439,25 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
cp = buf;
if (zeropad > 0 && buf[0] == '0' &&
(buf[1] == 'x' || buf[1] == 'X')) {
if (size > 1) {
if (size > 1U) {
*str++ = *cp++;
size--;
}
if (size > 1) {
if (size > 1U) {
*str++ = *cp++;
size--;
}
while (zeropad > 0 && size > 1) {
while (zeropad > 0 && size > 1U) {
*str++ = '0';
size--;
zeropad--;
}
}
while (*cp != '\0' && size > 1) {
while (*cp != '\0' && size > 1U) {
*str++ = *cp++;
size--;
}
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
@ -522,17 +523,17 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
}
count += length + pad;
if (!left)
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
}
cp = buf;
while (*cp != ' ' && size > 1) {
while (*cp != ' ' && size > 1U) {
*str++ = *cp++;
size--;
}
while (pad > 0 && size > 1) {
while (pad > 0 && size > 1U) {
*str++ = ' ';
size--;
pad--;
@ -547,7 +548,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
}
format++;
}
if (size > 0)
if (size > 0U)
*str = '\0';
return (count);
}