Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/msgc Remove some sign compare warnings.



details:   https://anonhg.NetBSD.org/src/rev/edd495e50895
branches:  trunk
changeset: 750481:edd495e50895
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sat Jan 02 16:08:20 2010 +0000

description:
Remove some sign compare warnings.

diffstat:

 usr.bin/msgc/msg_sys.def |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 3b0780b36cf9 -r edd495e50895 usr.bin/msgc/msg_sys.def
--- a/usr.bin/msgc/msg_sys.def  Sat Jan 02 15:20:39 2010 +0000
+++ b/usr.bin/msgc/msg_sys.def  Sat Jan 02 16:08:20 2010 +0000
@@ -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;
                }



Home | Main Index | Thread Index | Old Index