Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Delint.



details:   https://anonhg.NetBSD.org/src/rev/43f9a0168900
branches:  trunk
changeset: 480903:43f9a0168900
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sat Jan 22 22:53:59 2000 +0000

description:
Delint.

diffstat:

 lib/libc/net/gethnamaddr.c |  12 ++++++------
 lib/libc/net/rcmd.c        |   6 +++---
 lib/libc/net/res_init.c    |   7 ++++---
 lib/libc/quad/qdivrem.c    |  14 +++++++-------
 lib/libc/rpc/xdr.c         |  12 ++++++------
 sys/sys/exec_elf.h         |  14 +++++++-------
 6 files changed, 33 insertions(+), 32 deletions(-)

diffs (208 lines):

diff -r ba37021dcff2 -r 43f9a0168900 lib/libc/net/gethnamaddr.c
--- a/lib/libc/net/gethnamaddr.c        Sat Jan 22 22:40:58 2000 +0000
+++ b/lib/libc/net/gethnamaddr.c        Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gethnamaddr.c,v 1.29 2000/01/22 22:19:14 mycroft Exp $ */
+/*     $NetBSD: gethnamaddr.c,v 1.30 2000/01/22 23:30:27 mycroft Exp $ */
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -61,7 +61,7 @@
 static char sccsid[] = "@(#)gethostnamadr.c    8.1 (Berkeley) 6/4/93";
 static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: gethnamaddr.c,v 1.29 2000/01/22 22:19:14 mycroft Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.30 2000/01/22 23:30:27 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -647,8 +647,8 @@
        _DIAGASSERT(addr != NULL);
 
        if (af == AF_INET6 && len == IN6ADDRSZ &&
-           (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)uaddr) ||
-            IN6_IS_ADDR_V4COMPAT((struct in6_addr *)uaddr))) {
+           (IN6_IS_ADDR_V4MAPPED((const struct in6_addr *)uaddr) ||
+            IN6_IS_ADDR_V4COMPAT((const struct in6_addr *)uaddr))) {
                /* Unmap. */
                addr += IN6ADDRSZ - INADDRSZ;
                uaddr += IN6ADDRSZ - INADDRSZ;
@@ -780,12 +780,12 @@
 {
        struct hostent *hp;
        const char *name;
-       int len, af;
+       int af;
 
        _DIAGASSERT(rv != NULL);
 
        name = va_arg(ap, char *);
-       len = va_arg(ap, int);
+       /* NOSTRICT skip len */(void)va_arg(ap, int);
        af = va_arg(ap, int);
 
        hp = NULL;
diff -r ba37021dcff2 -r 43f9a0168900 lib/libc/net/rcmd.c
--- a/lib/libc/net/rcmd.c       Sat Jan 22 22:40:58 2000 +0000
+++ b/lib/libc/net/rcmd.c       Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcmd.c,v 1.34 1999/09/20 04:39:16 lukem Exp $  */
+/*     $NetBSD: rcmd.c,v 1.35 2000/01/22 23:34:28 mycroft Exp $        */
 
 /*
  * Copyright (c) 1997 Matthew R. Green.
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rcmd.c     8.3 (Berkeley) 3/26/94";
 #else
-__RCSID("$NetBSD: rcmd.c,v 1.34 1999/09/20 04:39:16 lukem Exp $");
+__RCSID("$NetBSD: rcmd.c,v 1.35 2000/01/22 23:34:28 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -483,7 +483,7 @@
 #endif
        for (;;) {
                *portp = htons((u_short)*alport);
-               if (bind(s, sa, salen) >= 0)
+               if (bind(s, sa, (size_t)salen) >= 0)
                        return (s);
                if (errno != EADDRINUSE) {
                        (void)close(s);
diff -r ba37021dcff2 -r 43f9a0168900 lib/libc/net/res_init.c
--- a/lib/libc/net/res_init.c   Sat Jan 22 22:40:58 2000 +0000
+++ b/lib/libc/net/res_init.c   Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: res_init.c,v 1.28 2000/01/22 22:19:16 mycroft Exp $    */
+/*     $NetBSD: res_init.c,v 1.29 2000/01/22 23:32:13 mycroft Exp $    */
 
 /*-
  * Copyright (c) 1985, 1989, 1993
@@ -59,7 +59,7 @@
 static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
 static char rcsid[] = "Id: res_init.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: res_init.c,v 1.28 2000/01/22 22:19:16 mycroft Exp $");
+__RCSID("$NetBSD: res_init.c,v 1.29 2000/01/22 23:32:13 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -316,7 +316,8 @@
                        memcpy(&sin->sin_addr, &a, sizeof(sin->sin_addr));
                        sin->sin_port = htons(NAMESERVER_PORT);
                        /* backward compat */
-                       memcpy(&_res.nsaddr_list[nserv], sin, sin->sin_len);
+                       memcpy(&_res.nsaddr_list[nserv], sin,
+                           (size_t)sin->sin_len);
                        nserv++;
                    }
 #else /* INET6 */
diff -r ba37021dcff2 -r 43f9a0168900 lib/libc/quad/qdivrem.c
--- a/lib/libc/quad/qdivrem.c   Sat Jan 22 22:40:58 2000 +0000
+++ b/lib/libc/quad/qdivrem.c   Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qdivrem.c,v 1.9 1999/09/17 09:18:15 kleink Exp $       */
+/*     $NetBSD: qdivrem.c,v 1.10 2000/01/22 23:02:19 mycroft Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)qdivrem.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: qdivrem.c,v 1.9 1999/09/17 09:18:15 kleink Exp $");
+__RCSID("$NetBSD: qdivrem.c,v 1.10 2000/01/22 23:02:19 mycroft Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -258,8 +258,8 @@
        if (arq) {
                if (d) {
                        for (i = m + n; i > m; --i)
-                               u[i] = ((u_long)u[i] >> d) |
-                                   LHALF((u_long)u[i - 1] << (HALF_BITS - d));
+                               u[i] = (digit)(((u_long)u[i] >> d) |
+                                   LHALF((u_long)u[i - 1] << (HALF_BITS - d)));
                        u[i] = 0;
                }
                tmp.ul[H] = COMBINE(uspace[1], uspace[2]);
@@ -283,7 +283,7 @@
        int i;
 
        for (i = 0; i < len; i++)
-               p[i] = LHALF((u_long)p[i] << sh) |
-                   (p[i + 1] >> (HALF_BITS - sh));
-       p[i] = (digit)LHALF(p[i] << sh);
+               p[i] = (digit)(LHALF((u_long)p[i] << sh) |
+                   ((u_long)p[i + 1] >> (HALF_BITS - sh)));
+       p[i] = (digit)(LHALF((u_long)p[i] << sh));
 }
diff -r ba37021dcff2 -r 43f9a0168900 lib/libc/rpc/xdr.c
--- a/lib/libc/rpc/xdr.c        Sat Jan 22 22:40:58 2000 +0000
+++ b/lib/libc/rpc/xdr.c        Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xdr.c,v 1.20 2000/01/22 22:19:18 mycroft Exp $ */
+/*     $NetBSD: xdr.c,v 1.21 2000/01/22 22:53:59 mycroft Exp $ */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)xdr.c 1.35 87/08/12";
 static char *sccsid = "@(#)xdr.c       2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: xdr.c,v 1.20 2000/01/22 22:19:18 mycroft Exp $");
+__RCSID("$NetBSD: xdr.c,v 1.21 2000/01/22 22:53:59 mycroft Exp $");
 #endif
 #endif
 
@@ -786,8 +786,8 @@
 
        switch (xdrs->x_op) {
        case XDR_ENCODE:
-               ul[0] = (*llp >> 32) & 0xffffffff;
-               ul[1] = *llp & 0xffffffff;
+               ul[0] = (u_long)((u_int64_t)*llp >> 32) & 0xffffffff;
+               ul[1] = (u_long)((u_int64_t)*llp) & 0xffffffff;
                if (XDR_PUTLONG(xdrs, (long *)&ul[0]) == FALSE)
                        return (FALSE);
                return (XDR_PUTLONG(xdrs, (long *)&ul[1]));
@@ -819,8 +819,8 @@
 
        switch (xdrs->x_op) {
        case XDR_ENCODE:
-               ul[0] = (*ullp >> 32) & 0xffffffff;
-               ul[1] = *ullp & 0xffffffff;
+               ul[0] = (u_long)(*ullp >> 32) & 0xffffffff;
+               ul[1] = (u_long)(*ullp) & 0xffffffff;
                if (XDR_PUTLONG(xdrs, (long *)&ul[0]) == FALSE)
                        return (FALSE);
                return (XDR_PUTLONG(xdrs, (long *)&ul[1]));
diff -r ba37021dcff2 -r 43f9a0168900 sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Sat Jan 22 22:40:58 2000 +0000
+++ b/sys/sys/exec_elf.h        Sat Jan 22 22:53:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.33 1999/12/30 15:48:19 eeh Exp $        */
+/*     $NetBSD: exec_elf.h,v 1.34 2000/01/22 23:07:53 mycroft Exp $    */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -324,13 +324,13 @@
 #define        STT_LOPROC              13      /* Processor-specific range */
 #define        STT_HIPROC              15
 
-#define        ELF32_ST_BIND(info)             ((info) >> 4)
-#define        ELF32_ST_TYPE(info)             ((info) & 0xf)
-#define        ELF32_ST_INFO(bind,type)        (((bind) << 4) + ((type) & 0xf))
+#define        ELF32_ST_BIND(info)             ((Elf32_Word)(info) >> 4)
+#define        ELF32_ST_TYPE(info)             ((Elf32_Word)(info) & 0xf)
+#define        ELF32_ST_INFO(bind,type)        ((Elf_Byte)(((bind) << 4) | ((type) & 0xf)))
 
-#define        ELF64_ST_BIND(info)             ((info) >> 4)
-#define        ELF64_ST_TYPE(info)             ((info) & 0xf)
-#define        ELF64_ST_INFO(bind,type)        (((bind) << 4) + ((type) & 0xf))
+#define        ELF64_ST_BIND(info)             ((Elf64_Word)(info) >> 4)
+#define        ELF64_ST_TYPE(info)             ((Elf64_Word)(info) & 0xf)
+#define        ELF64_ST_INFO(bind,type)        ((Elf_Byte)(((bind) << 4) | ((type) & 0xf)))
 
 /*
  * Special section indexes



Home | Main Index | Thread Index | Old Index