issues in 8.3.2
Jun-ichiro itojun Hagino
itojun at iijlab.net
Thu Jun 20 11:54:35 UTC 2002
the following patch lists some issues i saw in 8.3.2.
- typecast in bin/host/host.c (result of gethostinfo into struct
hostent *) is pretty gross. can we do this differently?
- printf type pedant.
- a couple of missing ISC_FORMAT_PRINTF().
itojun
Index: bin/host/host.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/host/host.c,v
retrieving revision 1.1.1.4
retrieving revision 1.6
diff -u -r1.1.1.4 -r1.6
--- bin/host/host.c 2002/06/20 10:29:27 1.1.1.4
+++ bin/host/host.c 2002/06/20 11:42:55 1.6
@@ -1,4 +1,4 @@
-/* $NetBSD: host.c,v 1.1.1.4 2002/06/20 10:29:27 itojun Exp $ */
+/* $NetBSD: host.c,v 1.6 2002/06/20 11:42:55 itojun Exp $ */
#ifndef lint
static const char rcsid[] = "Id: host.c,v 8.53 2002/06/18 02:34:02 marka Exp";
@@ -398,7 +398,7 @@
while (hp == NULL && res.res_h_errno == TRY_AGAIN) {
if (!ip) {
cname = NULL;
- hp = (struct hostent *)gethostinfo(getdomain);
+ hp = (struct hostent *)(unsigned long)gethostinfo(getdomain);
getdomain[0] = 0; /* clear this query */
if (sigchase && (chase_step & SD_RR)) {
if (nkeychains-- == 0) {
@@ -1323,15 +1323,15 @@
/* original ttl */
origttl = cp;
if (doprint && verbose)
- fprintf(file, " %ld", ns_get32(cp));
+ fprintf(file, " %lu", ns_get32(cp));
cp += INT32SZ;
/* signature expiration */
if (doprint && verbose)
- fprintf(file, " %ld", ns_get32(cp));
+ fprintf(file, " %lu", ns_get32(cp));
cp += INT32SZ;
/* time signed */
if (doprint && verbose)
- fprintf(file, " %ld", ns_get32(cp));
+ fprintf(file, " %lu", ns_get32(cp));
cp += INT32SZ;
/* key footprint */
if (doprint && verbose)
Index: bin/named/ns_config.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_config.c,v
retrieving revision 1.1.1.5
retrieving revision 1.7
diff -u -r1.1.1.5 -r1.7
--- bin/named/ns_config.c 2002/06/20 10:29:43 1.1.1.5
+++ bin/named/ns_config.c 2002/06/20 11:42:56 1.7
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_config.c,v 1.1.1.5 2002/06/20 10:29:43 itojun Exp $ */
+/* $NetBSD: ns_config.c,v 1.7 2002/06/20 11:42:56 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ns_config.c,v 8.135 2002/05/24 03:04:59 marka Exp";
@@ -1743,7 +1743,7 @@
*/
const char *
p_order(int order) {
- return (__sym_ntos(order_table, order, (int *)0));
+ return (sym_ntos(order_table, order, (int *)0));
}
/*
Index: bin/named/ns_forw.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_forw.c,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- bin/named/ns_forw.c 2002/06/20 10:29:46 1.1.1.4
+++ bin/named/ns_forw.c 2002/06/20 11:42:57 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_forw.c,v 1.1.1.4 2002/06/20 10:29:46 itojun Exp $ */
+/* $NetBSD: ns_forw.c,v 1.5 2002/06/20 11:42:57 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_forw.c 4.32 (Berkeley) 3/3/91";
@@ -847,8 +847,8 @@
ns_debug(ns_log_default, 4, "schedretry(%p, %ld sec)", qp, (long)t);
if (qp->q_time)
ns_debug(ns_log_default, 4,
- "WARNING: schedretry(%#lx, %ld) q_time already %ld",
- (u_long)qp, (long)t, (long)qp->q_time);
+ "WARNING: schedretry(%p, %ld) q_time already %ld",
+ qp, (long)t, (long)qp->q_time);
gettime(&tt);
t += (u_long) tt.tv_sec;
qp->q_time = t;
Index: bin/named/ns_glob.h
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_glob.h,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- bin/named/ns_glob.h 2002/06/20 10:29:48 1.1.1.3
+++ bin/named/ns_glob.h 2002/06/20 11:42:57 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_glob.h,v 1.1.1.3 2002/06/20 10:29:48 itojun Exp $ */
+/* $NetBSD: ns_glob.h,v 1.4 2002/06/20 11:42:57 itojun Exp $ */
/*
* from ns.h 4.33 (Berkeley) 8/23/90
@@ -316,14 +316,9 @@
#endif
;
-DECL const char panic_msg_no_options[]
- INIT("no server_options in NS_OPTION_P");
-
-DECL const char panic_msg_insist_failed[]
- INIT("%s:%d: insist '%s' failed: %s");
-
-DECL const char panic_msg_bad_which[]
- INIT("%s:%d: INCRSTATS(%s): bad \"which\"");
+#define panic_msg_no_options "no server_options in NS_OPTION_P"
+#define panic_msg_insist_failed "%s:%d: insist '%s' failed: %s"
+#define panic_msg_bad_which "%s:%d: INCRSTATS(%s): bad \"which\""
DECL u_long globalStats[nssLast];
Index: bin/named/ns_ixfr.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_ixfr.c,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- bin/named/ns_ixfr.c 2002/06/20 10:29:49 1.1.1.4
+++ bin/named/ns_ixfr.c 2002/06/20 11:42:57 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_ixfr.c,v 1.1.1.4 2002/06/20 10:29:49 itojun Exp $ */
+/* $NetBSD: ns_ixfr.c,v 1.5 2002/06/20 11:42:57 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ns_ixfr.c,v 8.32 2002/05/18 01:02:57 marka Exp";
@@ -427,8 +427,8 @@
return (-1);
}
(void) my_fclose(db_fp);
- ns_debug(ns_log_default, 3, "%s, size %ld",
- zp->z_source, (long)db_sb.st_size);
+ ns_debug(ns_log_default, 3, "%s, size %llu",
+ zp->z_source, (unsigned long long)db_sb.st_size);
/* open up the zone ixfr log */
if ((from_fp = fopen(zp->z_ixfr_base, "r")) == NULL) {
@@ -443,8 +443,9 @@
(void) my_fclose(from_fp);
return (-1);
}
- ns_debug(ns_log_default, 3, "%s, size %ld max %ld\n", zp->z_ixfr_base,
- (long)sb.st_size, (long)zp->z_max_log_size_ixfr);
+ ns_debug(ns_log_default, 3, "%s, size %llu max %ld\n", zp->z_ixfr_base,
+ (unsigned long long)sb.st_size,
+ (long)zp->z_max_log_size_ixfr);
if (zp->z_max_log_size_ixfr) {
if (sb.st_size > zp->z_max_log_size_ixfr)
seek = sb.st_size -
@@ -581,8 +582,8 @@
/* signal to read for lowest serial number */
zp->z_serial_ixfr_start = 0;
- ns_debug(ns_log_default, 3, "%s, size %ld max %ld\n", zp->z_ixfr_base,
- (long)sb.st_size, (long)zp->z_max_log_size_ixfr);
+ ns_debug(ns_log_default, 3, "%s, size %llu max %ld\n", zp->z_ixfr_base,
+ (unsigned long long)sb.st_size, (long)zp->z_max_log_size_ixfr);
if (error)
return(-1);
Index: bin/named/ns_lexer.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_lexer.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- bin/named/ns_lexer.c 2002/06/20 10:29:49 1.1.1.3
+++ bin/named/ns_lexer.c 2002/06/20 11:42:57 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_lexer.c,v 1.1.1.3 2002/06/20 10:29:49 itojun Exp $ */
+/* $NetBSD: ns_lexer.c,v 1.4 2002/06/20 11:42:57 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ns_lexer.c,v 8.31 2002/05/24 03:05:03 marka Exp";
@@ -138,6 +138,11 @@
return (buffer);
}
+
+static void
+parser_complain(int is_warning, int print_last_token, const char *format,
+ va_list args)
+ __attribute__((__format__(__printf__, 3, 0)));
static char where[MAXPATHLEN + 100];
static char message[20480];
Index: bin/named/ns_parser.y
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_parser.y,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- bin/named/ns_parser.y 2002/06/20 10:29:54 1.1.1.4
+++ bin/named/ns_parser.y 2002/06/20 11:42:58 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_parser.y,v 1.1.1.4 2002/06/20 10:29:54 itojun Exp $ */
+/* $NetBSD: ns_parser.y,v 1.5 2002/06/20 11:42:58 itojun Exp $ */
%{
#if !defined(lint) && !defined(SABER)
@@ -100,6 +100,8 @@
static void define_channel(const char *, log_channel);
static char *canonical_name(char *);
+extern const char *p_order(int order);
+
int yyparse();
%}
@@ -1848,8 +1850,8 @@
{
if ($1 < 0 || $1 > 65535) {
parser_warning(0,
- "invalid IP port number '%d'; setting port to 0",
- (int)$1);
+ "invalid IP port number '%ld'; setting port to 0",
+ $1);
$1 = 0;
} else
$$ = htons($1);
Index: bin/named/ns_resp.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/named/ns_resp.c,v
retrieving revision 1.1.1.5
retrieving revision 1.6
diff -u -r1.1.1.5 -r1.6
--- bin/named/ns_resp.c 2002/06/20 10:29:58 1.1.1.5
+++ bin/named/ns_resp.c 2002/06/20 11:42:58 1.6
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_resp.c,v 1.1.1.5 2002/06/20 10:29:58 itojun Exp $ */
+/* $NetBSD: ns_resp.c,v 1.6 2002/06/20 11:42:58 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91";
@@ -2052,7 +2052,7 @@
timetilexp = exptime - now;
if (timetilexp < ttl) {
ns_debug(ns_log_default, 3,
- "shrinking expiring %s SIG TTL from %d to %d",
+ "shrinking expiring %s SIG TTL from %d to %ld",
p_secstodate (exptime), ttl, timetilexp);
ttl = timetilexp;
}
Index: bin/ndc/ndc.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/ndc/ndc.c,v
retrieving revision 1.1.1.4
retrieving revision 1.6
diff -u -r1.1.1.4 -r1.6
--- bin/ndc/ndc.c 2002/06/20 10:30:04 1.1.1.4
+++ bin/ndc/ndc.c 2002/06/20 11:43:00 1.6
@@ -1,4 +1,4 @@
-/* $NetBSD: ndc.c,v 1.1.1.4 2002/06/20 10:30:04 itojun Exp $ */
+/* $NetBSD: ndc.c,v 1.6 2002/06/20 11:43:00 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ndc.c,v 1.21 2001/12/19 23:16:23 marka Exp";
@@ -90,7 +90,7 @@
static int fgetpid(const char *, pid_t *);
static int get_sockaddr(const char *, sockaddr_t *);
static size_t impute_addrlen(const struct sockaddr *);
-static void vtrace(const char *, va_list);
+static void vtrace(const char *, va_list) ISC_FORMAT_PRINTF(1, 0);
static void trace(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
static void result(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
static void fatal(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
Index: bin/nslookup/getinfo.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/nslookup/getinfo.c,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- bin/nslookup/getinfo.c 2002/06/20 10:30:06 1.1.1.4
+++ bin/nslookup/getinfo.c 2002/06/20 11:43:00 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: getinfo.c,v 1.1.1.4 2002/06/20 10:30:06 itojun Exp $ */
+/* $NetBSD: getinfo.c,v 1.5 2002/06/20 11:43:00 itojun Exp $ */
/*
* Copyright (c) 1985, 1989
@@ -329,7 +329,7 @@
memcpy(hostPtr->name, bp, s);
}
}
- bp += (((u_int32_t)bp) % sizeof(align));
+ bp += (((size_t)bp) % sizeof(align));
if (bp + dlen >= &hostbuf[sizeof(hostbuf)]) {
if (res.options & RES_DEBUG) {
Index: bin/nsupdate/nsupdate.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/bin/nsupdate/nsupdate.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- bin/nsupdate/nsupdate.c 2002/06/20 10:30:08 1.1.1.3
+++ bin/nsupdate/nsupdate.c 2002/06/20 11:43:01 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: nsupdate.c,v 1.1.1.3 2002/06/20 10:30:08 itojun Exp $ */
+/* $NetBSD: nsupdate.c,v 1.4 2002/06/20 11:43:01 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: nsupdate.c,v 8.27 2001/06/18 14:43:46 marka Exp";
@@ -400,11 +400,13 @@
(void) getword_str(buf2, sizeof buf2, &startp, endp);
if (isdigit(buf2[0])) { /* ttl */
- r_ttl = strtoul(buf2, 0, 10);
- if (errno == ERANGE && r_ttl == ULONG_MAX) {
+ u_long tmp_ttl = strtoul(buf2, 0, 10);
+ if ((errno == ERANGE && tmp_ttl == ULONG_MAX) ||
+ tmp_ttl > UINT32_MAX) {
fprintf(stderr, "oversized ttl: %s\n", buf2);
exit (1);
}
+ r_ttl = tmp_ttl;
(void) getword_str(buf2, sizeof buf2, &startp, endp);
}
Index: doc/bog/files.me
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/doc/bog/files.me,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- doc/bog/files.me 2000/04/28 03:39:17 1.1.1.1
+++ doc/bog/files.me 2001/11/21 19:14:22 1.2
@@ -1,4 +1,4 @@
-.\" $NetBSD: files.me,v 1.1.1.1 2000/04/28 03:39:17 itojun Exp $
+.\" $NetBSD: files.me,v 1.2 2001/11/21 19:14:22 wiz Exp $
.\"
.\" ++Copyright++ 1986, 1988, 1995
.\" -
@@ -704,7 +704,7 @@
.pp
The origin is a way of changing the origin in a data file. The line starts
in column 1, and is followed by a domain origin. This seems like it could
-be useful for putting more then one zone into a data file, but that's not
+be useful for putting more than one zone into a data file, but that's not
how it works. The name server fundamentally requires a given zone to map
entirely to some specific file. You should therefore be very careful to use
$ORIGIN only once at the top of a file, or, within a file, to change to a
Index: include/prand_conf.h
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/include/prand_conf.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- include/prand_conf.h 2001/05/17 20:46:41 1.1.1.2
+++ include/prand_conf.h 2001/05/17 22:59:41 1.2
@@ -1,4 +1,4 @@
-/* $NetBSD: prand_conf.h,v 1.1.1.2 2001/05/17 20:46:41 itojun Exp $ */
+/* $NetBSD: prand_conf.h,v 1.2 2001/05/17 22:59:41 itojun Exp $ */
#ifndef _PRAND_CMD_H_
#define _PRAND_CMD_H_
@@ -9,7 +9,7 @@
#endif /* HAVE_DEV_RANDOM */
-static static const char *cmds[] = {
+static const char *cmds[] = {
"/bin/ps -axlw 2>&1",
"/usr/sbin/arp -an 2>&1",
"/usr/bin/netstat -an 2>&1",
Index: include/isc/logging.h
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/include/isc/logging.h,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- include/isc/logging.h 2002/06/20 10:30:11 1.1.1.3
+++ include/isc/logging.h 2002/06/20 11:43:02 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: logging.h,v 1.1.1.3 2002/06/20 10:30:11 itojun Exp $ */
+/* $NetBSD: logging.h,v 1.4 2002/06/20 11:43:02 itojun Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
@@ -82,12 +82,15 @@
char * log_get_filename(log_channel);
int log_check_channel(log_context, int, log_channel);
int log_check(log_context, int, int);
-void log_vwrite(log_context, int, int, const char *,
- va_list args);
#ifdef __GNUC__
+void log_vwrite(log_context, int, int, const char *,
+ va_list args)
+ __attribute__((__format__(__printf__, 4, 0)));
void log_write(log_context, int, int, const char *, ...)
__attribute__((__format__(__printf__, 4, 5)));
#else
+void log_vwrite(log_context, int, int, const char *,
+ va_list args)
void log_write(log_context, int, int, const char *, ...);
#endif
int log_new_context(int, char **, log_context *);
Index: lib/inet/inet_ntop.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/inet/inet_ntop.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/inet/inet_ntop.c 2002/06/20 10:30:19 1.1.1.3
+++ lib/inet/inet_ntop.c 2002/06/20 11:43:03 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: inet_ntop.c,v 1.1.1.3 2002/06/20 10:30:19 itojun Exp $ */
+/* $NetBSD: inet_ntop.c,v 1.4 2002/06/20 11:43:03 itojun Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
@@ -48,8 +48,8 @@
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
*/
-static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size));
-static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size));
+static const char *inet_ntop4 __P((const u_char *src, char *dst, socklen_t size));
+static const char *inet_ntop6 __P((const u_char *src, char *dst, socklen_t size));
/* char *
* inet_ntop(af, src, dst, size)
@@ -64,7 +64,7 @@
int af;
const void *src;
char *dst;
- size_t size;
+ socklen_t size;
{
switch (af) {
case AF_INET:
@@ -93,7 +93,7 @@
inet_ntop4(src, dst, size)
const u_char *src;
char *dst;
- size_t size;
+ socklen_t size;
{
static const char fmt[] = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
@@ -116,7 +116,7 @@
inet_ntop6(src, dst, size)
const u_char *src;
char *dst;
- size_t size;
+ socklen_t size;
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
Index: lib/isc/ctl_clnt.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ctl_clnt.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/isc/ctl_clnt.c 2002/06/20 10:30:35 1.1.1.3
+++ lib/isc/ctl_clnt.c 2002/06/20 11:43:06 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: ctl_clnt.c,v 1.1.1.3 2002/06/20 10:30:35 itojun Exp $ */
+/* $NetBSD: ctl_clnt.c,v 1.4 2002/06/20 11:43:06 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ctl_clnt.c,v 8.17 2001/06/06 00:33:35 marka Exp";
@@ -187,7 +187,7 @@
if (evConnect(lev, ctx->sock, (const struct sockaddr *)sap, sap_len,
conn_done, ctx, &ctx->coID) < 0) {
(*ctx->logger)(ctl_error, "%s: evConnect(fd %d): %s",
- me, (void *)ctx->sock, strerror(errno));
+ me, ctx->sock, strerror(errno));
fatal:
if (ctx != NULL) {
if (ctx->sock >= 0)
Index: lib/isc/ctl_srvr.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ctl_srvr.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/isc/ctl_srvr.c 2002/06/20 10:30:35 1.1.1.3
+++ lib/isc/ctl_srvr.c 2002/06/20 11:43:07 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: ctl_srvr.c,v 1.1.1.3 2002/06/20 10:30:35 itojun Exp $ */
+/* $NetBSD: ctl_srvr.c,v 1.4 2002/06/20 11:43:07 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: ctl_srvr.c,v 8.25 2001/05/29 05:49:27 marka Exp";
@@ -254,7 +254,7 @@
&ctx->acID) < 0) {
save_errno = errno;
(*ctx->logger)(ctl_error, "%s: evListen(fd %d): %s",
- me, (void *)ctx->sock, strerror(errno));
+ me, ctx->sock, strerror(errno));
close(ctx->sock);
memput(ctx, sizeof *ctx);
errno = save_errno;
Index: lib/isc/ev_files.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ev_files.c,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- lib/isc/ev_files.c 2002/06/20 10:30:35 1.1.1.2
+++ lib/isc/ev_files.c 2002/06/20 11:43:07 1.3
@@ -1,4 +1,4 @@
-/* $NetBSD: ev_files.c,v 1.1.1.2 2002/06/20 10:30:35 itojun Exp $ */
+/* $NetBSD: ev_files.c,v 1.3 2002/06/20 11:43:07 itojun Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@@ -56,7 +56,7 @@
int mode;
evPrintf(ctx, 1,
- "evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n",
+ "evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n",
ctx, fd, eventmask, func, uap);
if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0)
EV_ERR(EINVAL);
Index: lib/isc/ev_streams.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ev_streams.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- lib/isc/ev_streams.c 2002/06/20 10:30:35 1.1.1.2
+++ lib/isc/ev_streams.c 2002/06/20 11:43:07 1.2
@@ -1,4 +1,4 @@
-/* $NetBSD: ev_streams.c,v 1.1.1.2 2002/06/20 10:30:35 itojun Exp $ */
+/* $NetBSD: ev_streams.c,v 1.2 2002/06/20 11:43:07 itojun Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium
Index: lib/isc/ev_timers.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ev_timers.c,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- lib/isc/ev_timers.c 2002/06/20 10:30:36 1.1.1.4
+++ lib/isc/ev_timers.c 2002/06/20 11:43:07 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: ev_timers.c,v 1.1.1.4 2002/06/20 10:30:36 itojun Exp $ */
+/* $NetBSD: ev_timers.c,v 1.5 2002/06/20 11:43:07 itojun Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@@ -154,10 +154,10 @@
evTimer *id;
evPrintf(ctx, 1,
-"evSetTimer(ctx %#x, func %#x, uap %#x, due %d.%09ld, inter %d.%09ld)\n",
+"evSetTimer(ctx %p, func %p, uap %p, due %d.%09ld, inter %d.%09ld)\n",
ctx, func, uap,
- due.tv_sec, due.tv_nsec,
- inter.tv_sec, inter.tv_nsec);
+ (int)due.tv_sec, due.tv_nsec,
+ (int)inter.tv_sec, inter.tv_nsec);
/* due={0,0} is a magic cookie meaning "now." */
if (due.tv_sec == 0 && due.tv_nsec == 0L)
@@ -383,8 +383,8 @@
evPrintf(ctx, 7,
" func %p, uap %p, due %d.%09ld, inter %d.%09ld\n",
cur->func, cur->uap,
- cur->due.tv_sec, cur->due.tv_nsec,
- cur->inter.tv_sec, cur->inter.tv_nsec);
+ (int)cur->due.tv_sec, cur->due.tv_nsec,
+ (int)cur->inter.tv_sec, cur->inter.tv_nsec);
}
static void
Index: lib/isc/ev_waits.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/ev_waits.c,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- lib/isc/ev_waits.c 2001/01/27 06:20:09 1.1.1.2
+++ lib/isc/ev_waits.c 2001/01/27 07:22:04 1.3
@@ -1,4 +1,4 @@
-/* $NetBSD: ev_waits.c,v 1.1.1.2 2001/01/27 06:20:09 itojun Exp $ */
+/* $NetBSD: ev_waits.c,v 1.3 2001/01/27 07:22:04 itojun Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium
@@ -192,14 +192,14 @@
evPrintf(ctx, 9, "wait waiting:\n");
for (wl = ctx->waitLists; wl != NULL; wl = wl->next) {
INSIST(wl->first != NULL);
- evPrintf(ctx, 9, " tag %#x:", wl->first->tag);
+ evPrintf(ctx, 9, " tag %p:", wl->first->tag);
for (this = wl->first; this != NULL; this = this->next)
- evPrintf(ctx, 9, " %#x", this);
+ evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}
evPrintf(ctx, 9, "wait done:");
for (this = ctx->waitDone.first; this != NULL; this = this->next)
- evPrintf(ctx, 9, " %#x", this);
+ evPrintf(ctx, 9, " %p", this);
evPrintf(ctx, 9, "\n");
}
Index: lib/isc/eventlib.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/eventlib.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/isc/eventlib.c 2002/06/20 10:30:37 1.1.1.3
+++ lib/isc/eventlib.c 2002/06/20 11:43:07 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: eventlib.c,v 1.1.1.3 2002/06/20 10:30:37 itojun Exp $ */
+/* $NetBSD: eventlib.c,v 1.4 2002/06/20 11:43:07 itojun Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@@ -298,7 +298,7 @@
(u_long)ctx->rdLast.fds_bits[0],
(u_long)ctx->wrLast.fds_bits[0],
(u_long)ctx->exLast.fds_bits[0],
- tp ? tp->tv_sec : -1,
+ tp ? (int)tp->tv_sec : -1,
tp ? tp->tv_nsec : -1);
/* XXX should predict system's earliness and adjust. */
@@ -465,7 +465,7 @@
evAccept *this = ev->u.accept.this;
evPrintf(ctx, 5,
- "Dispatch.Accept: fd %d -> %d, func %#x, uap %#x\n",
+ "Dispatch.Accept: fd %d -> %d, func %p, uap %p\n",
this->conn->fd, this->fd,
this->conn->func, this->conn->uap);
errno = this->ioErrno;
@@ -482,7 +482,7 @@
int eventmask = ev->u.file.eventmask;
evPrintf(ctx, 5,
- "Dispatch.File: fd %d, mask 0x%x, func %#x, uap %#x\n",
+ "Dispatch.File: fd %d, mask 0x%x, func %p, uap %p\n",
this->fd, this->eventmask, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->fd, eventmask);
#ifdef EVENTLIB_TIME_CHECKS
@@ -494,7 +494,7 @@
evStream *this = ev->u.stream.this;
evPrintf(ctx, 5,
- "Dispatch.Stream: fd %d, func %#x, uap %#x\n",
+ "Dispatch.Stream: fd %d, func %p, uap %p\n",
this->fd, this->func, this->uap);
errno = this->ioErrno;
(this->func)(opaqueCtx, this->uap, this->fd, this->ioDone);
@@ -506,7 +506,7 @@
case Timer: {
evTimer *this = ev->u.timer.this;
- evPrintf(ctx, 5, "Dispatch.Timer: func %#x, uap %#x\n",
+ evPrintf(ctx, 5, "Dispatch.Timer: func %p, uap %p\n",
this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->due, this->inter);
#ifdef EVENTLIB_TIME_CHECKS
@@ -518,7 +518,7 @@
evWait *this = ev->u.wait.this;
evPrintf(ctx, 5,
- "Dispatch.Wait: tag %#x, func %#x, uap %#x\n",
+ "Dispatch.Wait: tag %p, func %p, uap %p\n",
this->tag, this->func, this->uap);
(this->func)(opaqueCtx, this->uap, this->tag);
#ifdef EVENTLIB_TIME_CHECKS
Index: lib/isc/eventlib_p.h
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/isc/eventlib_p.h,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/isc/eventlib_p.h 2002/06/20 10:30:37 1.1.1.3
+++ lib/isc/eventlib_p.h 2002/06/20 11:43:07 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: eventlib_p.h,v 1.1.1.3 2002/06/20 10:30:37 itojun Exp $ */
+/* $NetBSD: eventlib_p.h,v 1.4 2002/06/20 11:43:07 itojun Exp $ */
/*
* Copyright (c) 1995-1999 by Internet Software Consortium
@@ -200,7 +200,8 @@
/* eventlib.c */
#define evPrintf __evPrintf
-void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...);
+void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...)
+ __attribute__((__format__(__printf__, 3, 4)));
/* ev_timers.c */
#define evCreateTimers __evCreateTimers
Index: lib/nameser/ns_parse.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/nameser/ns_parse.c,v
retrieving revision 1.1.1.3
retrieving revision 1.4
diff -u -r1.1.1.3 -r1.4
--- lib/nameser/ns_parse.c 2002/06/20 10:30:39 1.1.1.3
+++ lib/nameser/ns_parse.c 2002/06/20 11:43:08 1.4
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_parse.c,v 1.1.1.3 2002/06/20 10:30:39 itojun Exp $ */
+/* $NetBSD: ns_parse.c,v 1.4 2002/06/20 11:43:08 itojun Exp $ */
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
@@ -134,9 +134,10 @@
int
ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
int b;
+ int tmp;
/* Make section right. */
- if (section >= ns_s_max)
+ if ((tmp = section) < 0 || section >= ns_s_max)
RETERR(ENODEV);
if (section != handle->_sect)
setsection(handle, section);
Index: lib/resolv/res_update.c
===================================================================
RCS file: /cvsroot/basesrc/dist/bind/lib/resolv/res_update.c,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -u -r1.1.1.4 -r1.5
--- lib/resolv/res_update.c 2002/06/20 10:30:44 1.1.1.4
+++ lib/resolv/res_update.c 2002/06/20 11:43:08 1.5
@@ -1,4 +1,4 @@
-/* $NetBSD: res_update.c,v 1.1.1.4 2002/06/20 10:30:44 itojun Exp $ */
+/* $NetBSD: res_update.c,v 1.5 2002/06/20 11:43:08 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "Id: res_update.c,v 1.34 2002/04/12 06:28:52 marka Exp";
@@ -79,7 +79,7 @@
/* Forward. */
-static void res_dprintf(const char *, ...);
+static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
/* Macros. */
More information about the bind-workers
mailing list