From 99db72360c5ef77ea597e7943efcb85ca63e455b Mon Sep 17 00:00:00 2001 From: dsl Date: Sat, 2 Jan 2010 16:08:20 +0000 Subject: Remove some sign compare warnings. --- usr.bin/msgc/msg_sys.def | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin/msgc/msg_sys.def') 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; } -- cgit