]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings
authorMark Andrews <marka@isc.org>
Wed, 17 Mar 2004 01:15:49 +0000 (01:15 +0000)
committerMark Andrews <marka@isc.org>
Wed, 17 Mar 2004 01:15:49 +0000 (01:15 +0000)
lib/bind/irs/dns_ho.c
lib/bind/irs/irpmarshall.c
lib/bind/isc/ctl_clnt.c
lib/bind/isc/ctl_srvr.c
lib/bind/isc/ev_timers.c
lib/bind/nameser/ns_print.c

index 8f52d61b6f4f6e77b95d44f97d5df51825ba40d6..b1090f88b23c5800b98d2a89093007684db23c87 100644 (file)
@@ -52,7 +52,7 @@
 /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.9 2004/03/17 00:40:11 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.10 2004/03/17 01:15:46 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -838,7 +838,7 @@ gethostans(struct irs_ho *this,
                        }
                        cp += n;
 #ifdef RES_USE_DNAME
-                       if ((pvt->res->options & RES_USE_DNAME) != 0)
+                       if ((pvt->res->options & RES_USE_DNAME) != 0U)
 #endif
                        {
                                /*
index 56095f0fb9013c1a4fd3c59a81adbca0092379d4..8776b16e4f368434353cb0ef4e93e166c5054246 100644 (file)
@@ -49,7 +49,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.2 2004/03/17 00:40:12 marka Exp $";
+static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.3 2004/03/17 01:15:47 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #if 0
@@ -523,7 +523,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
        /* gr_gid field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        t = strtol(tmpbuf, &tb, 10);
@@ -679,7 +679,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
 
        /* s_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
@@ -700,7 +700,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
        /* s_port field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        t = strtol(tmpbuf, &tb, 10);
@@ -837,7 +837,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
 
        /* p_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
@@ -858,7 +858,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
        /* p_proto field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        t = strtol(tmpbuf, &tb, 10);
@@ -1040,7 +1040,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
 
        /* h_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
@@ -1061,7 +1061,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
        /* h_addrtype field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        if (strcmp(tmpbuf, "AF_INET") == 0)
@@ -1075,7 +1075,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
        /* h_length field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        t = strtol(tmpbuf, &tb, 10);
@@ -1428,7 +1428,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
 
        /* n_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
@@ -1449,7 +1449,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
        /* h_addrtype field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        if (strcmp(tmpbuf, "AF_INET") == 0)
@@ -1463,7 +1463,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
        /* n_net field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        nnet = 0;
@@ -1605,7 +1605,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
 
        /* n_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
@@ -1626,7 +1626,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
        /* h_addrtype field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        if (strcmp(tmpbuf, "AF_INET") == 0)
@@ -1640,7 +1640,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
        /* n_net field */
        tb = tmpbuf;
        if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
-           strlen(tb) == 0) {
+           strlen(tb) == 0U) {
                goto error;
        }
        bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
@@ -1961,12 +1961,12 @@ strcmp_nws(const char *a, const char *b) {
 static void
 free_array(char **argv, size_t entries) {
        char **p = argv;
-       int useEntries = (entries > 0);
+       int useEntries = (entries > 0U);
 
        if (argv == NULL)
                return;
 
-       while ((useEntries && entries > 0) || *p) {
+       while ((useEntries && entries > 0U) || *p) {
                if (*p)
                        free(*p);
                p++;
index f63636b4c580eb7939bfd122b19140fe71697799..1d3980c236843b9a97eea9cc5e0ea34ccafca5d9 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4.2.3 2004/03/17 00:40:14 marka Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4.2.4 2004/03/17 01:15:48 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -234,7 +234,7 @@ ctl_command(struct ctl_cctx *ctx, const char *cmd, size_t len,
        default:
                abort();
        }
-       if (len >= MAX_LINELEN) {
+       if (len >= (size_t)MAX_LINELEN) {
                errno = EMSGSIZE;
                return (-1);
        }
@@ -543,7 +543,7 @@ readable(evContext ev, void *uap, int fd, int evmask) {
                        goto again;
                return;
        }
-       if (ctx->inbuf.used == MAX_LINELEN) {
+       if (ctx->inbuf.used == (size_t)MAX_LINELEN) {
                (*ctx->logger)(ctl_error, "%s: line too long (%-10s...)", me,
                               ctx->inbuf.text);
                error(ctx);
index 6d7f7278bb2f78aa275d5d3c433bfb1199489238..91b9e9aeb6f796032ea95e6887f32b7427e7a590 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.3 2004/03/17 00:40:14 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.4 2004/03/17 01:15:48 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -321,7 +321,7 @@ ctl_response(struct ctl_sess *sess, u_int code, const char *text,
                               me, address_expr);
                goto untimely;
        }
-       if (sizeof "000-\r\n" + strlen(text) > MAX_LINELEN) {
+       if (sizeof "000-\r\n" + strlen(text) > (size_t)MAX_LINELEN) {
                (*ctx->logger)(ctl_error, "%s: %s: output buffer ovf, closing",
                               me, address_expr);
                goto untimely;
@@ -610,7 +610,7 @@ ctl_readable(evContext lev, void *uap, int fd, int evmask) {
                        memmove(sess->inbuf.text, eos + 1, sess->inbuf.used);
                return;
        }
-       if (sess->inbuf.used == MAX_LINELEN) {
+       if (sess->inbuf.used == (size_t)MAX_LINELEN) {
                (*ctx->logger)(ctl_error, "%s: %s: line too long, closing",
                               me, address_expr);
                ctl_close(sess);
index 764c88f0dc1fe13bd9d21db3f63d8a9c2a0a6100..1c5e312c3c5cea5f042d79b4a965c629c6d804ec 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.3 2004/03/17 00:40:15 marka Exp $";
+static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.4 2004/03/17 01:15:48 marka Exp $";
 #endif
 
 /* Import. */
@@ -180,10 +180,10 @@ evSetTimer(evContext opaqueCtx,
                 (long)due.tv_sec, due.tv_nsec,
                 (long)inter.tv_sec, inter.tv_nsec);
 
-       if (due.tv_sec < 0 || due.tv_nsec > BILLION)
+       if (due.tv_sec < (time_t)0 || due.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
-       if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
+       if (inter.tv_sec < (time_t)0 || inter.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
        /* due={0,0} is a magic cookie meaning "now." */
@@ -285,10 +285,10 @@ evResetTimer(evContext opaqueCtx,
        if (heap_element(ctx->timers, timer->index) != timer)
                EV_ERR(ENOENT);
 
-       if (due.tv_sec < 0 || due.tv_nsec > BILLION)
+       if (due.tv_sec < (time_t)0 || due.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
-       if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
+       if (inter.tv_sec < (time_t)0 || inter.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
        old_due = timer->due;
index 59b73c993f24cca13667c8557f2ab81f48a9714f..965139e5292131e9fe8dcfbe96dbc84ff4887d52 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.4 2004/03/17 00:40:15 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.5 2004/03/17 01:15:49 marka Exp $";
 #endif
 
 /* Import. */
@@ -154,7 +154,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
         */
        switch (type) {
        case ns_t_a:
-               if (rdlen != NS_INADDRSZ)
+               if (rdlen != (size_t)NS_INADDRSZ)
                        goto formerr;
                (void) inet_ntop(AF_INET, rdata, buf, buflen);
                addlen(strlen(buf), &buf, &buflen);
@@ -258,7 +258,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
        case ns_t_rt: {
                u_int t;
 
-               if (rdlen < NS_INT16SZ)
+               if (rdlen < (size_t)NS_INT16SZ)
                        goto formerr;
 
                /* Priority. */
@@ -276,7 +276,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
        case ns_t_px: {
                u_int t;
 
-               if (rdlen < NS_INT16SZ)
+               if (rdlen < (size_t)NS_INT16SZ)
                        goto formerr;
 
                /* Priority. */
@@ -322,7 +322,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
            }
 
        case ns_t_aaaa:
-               if (rdlen != NS_IN6ADDRSZ)
+               if (rdlen != (size_t)NS_IN6ADDRSZ)
                        goto formerr;
                (void) inet_ntop(AF_INET6, rdata, buf, buflen);
                addlen(strlen(buf), &buf, &buflen);