Module Name:    src
Committed By:   dsl
Date:           Sat Jan  2 16:08:20 UTC 2010

Modified Files:
        src/usr.bin/msgc: msg_sys.def

Log Message:
Remove some sign compare warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/msgc/msg_sys.def

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

Modified files:

Index: src/usr.bin/msgc/msg_sys.def
diff -u src/usr.bin/msgc/msg_sys.def:1.37 src/usr.bin/msgc/msg_sys.def:1.38
--- src/usr.bin/msgc/msg_sys.def:1.37	Sun Dec  3 01:18:34 2006
+++ src/usr.bin/msgc/msg_sys.def	Sat Jan  2 16:08:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_sys.def,v 1.37 2006/12/03 01:18:34 christos Exp $	*/
+/*	$NetBSD: msg_sys.def,v 1.38 2010/01/02 16:08:20 dsl Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -52,7 +52,7 @@
 
 static char *msgmap = MAP_FAILED;
 static size_t msgmapsz;
-static int msgmapcount;
+static unsigned int msgmapcount;
 
 /* Routines */
 
@@ -124,7 +124,7 @@
 const char *
 msg_string(msg msg_no)
 {
-	int m = (intptr_t)msg_no;
+	uintptr_t m = (uintptr_t)msg_no;
 
 	if (m > sizeof msg_list / sizeof msg_list[0])
 		/* guess that we were passed a text string */
@@ -430,7 +430,7 @@
 				pos++;
 			break;
 		default:
-			if (len < (val_buf_len - 1) && isprint(ch)) {
+			if (len < (int)(val_buf_len - 1) && isprint(ch)) {
 				memmove(ibuf + pos + 1, ibuf + pos, len - pos);
 				ibuf[pos++] = ch;
 				len++;
@@ -487,7 +487,7 @@
 		va_start(ap, val_buf_len);
 		w = vsnprintf(NULL, 0, msg_string(msg_no), ap);
 		va_end(ap);
-		if (def != NULL && *def != 0 && w + val_buf_len * 2 < maxx) {
+		if (def != NULL && *def != 0 && w + (int)val_buf_len * 2 < maxx) {
 			w += 2 + strlen(def) + 1;
 			msg_flags &= ~MSG_PROMPT_HIDE_DFLT;
 		}

Reply via email to