Module Name:    src
Committed By:   msaitoh
Date:           Mon Oct 15 22:22:01 UTC 2012

Modified Files:
        src/lib/libc/citrus: citrus_module.c
        src/lib/libc/compat/net: compat_ns_addr.c

Log Message:
-Wstrict-overflow


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/citrus/citrus_module.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/net/compat_ns_addr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/citrus/citrus_module.c
diff -u src/lib/libc/citrus/citrus_module.c:1.9 src/lib/libc/citrus/citrus_module.c:1.10
--- src/lib/libc/citrus/citrus_module.c:1.9	Sun Jan 11 02:46:24 2009
+++ src/lib/libc/citrus/citrus_module.c	Mon Oct 15 22:22:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: citrus_module.c,v 1.9 2009/01/11 02:46:24 christos Exp $	*/
+/*	$NetBSD: citrus_module.c,v 1.10 2012/10/15 22:22:01 msaitoh Exp $	*/
 
 /*-
  * Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -89,7 +89,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_module.c,v 1.9 2009/01/11 02:46:24 christos Exp $");
+__RCSID("$NetBSD: citrus_module.c,v 1.10 2012/10/15 22:22:01 msaitoh Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -111,8 +111,8 @@ __RCSID("$NetBSD: citrus_module.c,v 1.9 
 
 #ifdef _I18N_DYNAMIC
 
-static int _getdewey(int [], char *);
-static int _cmpndewey(int [], int, int [], int);
+static unsigned int _getdewey(int [], char *);
+static int _cmpndewey(int [], unsigned int, int [], unsigned int);
 static const char *_findshlib(char *, int *, int *);
 
 static const char *_pathI18nModule = NULL;
@@ -122,10 +122,10 @@ static const char *_pathI18nModule = NUL
 #undef minor
 #define MAXDEWEY	3	/*ELF*/
 
-static int
+static unsigned int
 _getdewey(int dewey[], char *cp)
 {
-	int	i, n;
+	unsigned int	i, n;
 
 	_DIAGASSERT(dewey != NULL);
 	_DIAGASSERT(cp != NULL);
@@ -151,9 +151,9 @@ _getdewey(int dewey[], char *cp)
  * Return  0 if equal.
  */
 static int
-_cmpndewey(int d1[], int n1, int d2[], int n2)
+_cmpndewey(int d1[], unsigned int n1, int d2[], unsigned int n2)
 {
-	register int	i;
+	register unsigned int	i;
 
 	_DIAGASSERT(d1 != NULL);
 	_DIAGASSERT(d2 != NULL);
@@ -182,7 +182,7 @@ static const char *
 _findshlib(char *name, int *majorp, int *minorp)
 {
 	int		dewey[MAXDEWEY];
-	int		ndewey;
+	unsigned int	ndewey;
 	int		tmp[MAXDEWEY];
 	int		i;
 	int		len;
@@ -215,7 +215,7 @@ _findshlib(char *name, int *majorp, int 
 			continue;
 
 		while ((dp = readdir(dd)) != NULL) {
-			int	n;
+			unsigned int	n;
 
 			if (dp->d_namlen < len + 4)
 				continue;

Index: src/lib/libc/compat/net/compat_ns_addr.c
diff -u src/lib/libc/compat/net/compat_ns_addr.c:1.2 src/lib/libc/compat/net/compat_ns_addr.c:1.3
--- src/lib/libc/compat/net/compat_ns_addr.c:1.2	Tue Mar 20 17:05:59 2012
+++ src/lib/libc/compat/net/compat_ns_addr.c	Mon Oct 15 22:22:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_ns_addr.c,v 1.2 2012/03/20 17:05:59 matt Exp $	*/
+/*	$NetBSD: compat_ns_addr.c,v 1.3 2012/10/15 22:22:01 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1986, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)ns_addr.c	8.1 (Berkeley) 6/7/93";
 #else
-__RCSID("$NetBSD: compat_ns_addr.c,v 1.2 2012/03/20 17:05:59 matt Exp $");
+__RCSID("$NetBSD: compat_ns_addr.c,v 1.3 2012/10/15 22:22:01 msaitoh Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -104,7 +104,8 @@ static void
 Field(char *buf, uint8_t *out, int len)
 {
 	register char *bp = buf;
-	int i, ibase, base16 = 0, base10 = 0, clen = 0;
+	int i, ibase, base16 = 0, base10 = 0;
+	unsigned int clen = 0;
 	int hb[6], *hp;
 
 	_DIAGASSERT(buf != NULL);

Reply via email to