summaryrefslogtreecommitdiff
path: root/usr.bin/msgc/msg_sys.def
diff options
context:
space:
mode:
authordsl <dsl@NetBSD.org>2010-01-02 16:08:20 +0000
committerdsl <dsl@NetBSD.org>2010-01-02 16:08:20 +0000
commit99db72360c5ef77ea597e7943efcb85ca63e455b (patch)
treedb50e74905b70a4e488d16b035291368c7618f8e /usr.bin/msgc/msg_sys.def
parentd5c1a554d814a4b56f35acc4f298abe769bf9954 (diff)
Remove some sign compare warnings.
Diffstat (limited to 'usr.bin/msgc/msg_sys.def')
-rw-r--r--usr.bin/msgc/msg_sys.def10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/msgc/msg_sys.def b/usr.bin/msgc/msg_sys.def
index 7df39dd90e0..f9abe38db40 100644
--- a/usr.bin/msgc/msg_sys.def
+++ b/usr.bin/msgc/msg_sys.def
@@ -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 void _msg_vprompt(const char *, int, const char *, char *,
static char *msgmap = MAP_FAILED;
static size_t msgmapsz;
-static int msgmapcount;
+static unsigned int msgmapcount;
/* Routines */
@@ -124,7 +124,7 @@ msg_file(const char *file)
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 @@ _msg_vprompt(const char *fmt, int flags, const char *def, char *val,
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 @@ msg_prompt_win(msg msg_no, int x, int y, int w, int h,
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;
}