[MPlayer-dev-eng] [PATCH] fix signed/unsigned comparison in iconv call in mp_msg.c

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Oct 8 17:02:25 CEST 2006


man iconv says:

3. An incomplete multibyte sequence is encountered in the input, and the
input byte sequence terminates after it. In this case it sets errno to
EINVAL and returns (size_t)(-1). *inbuf is left pointing to the beginning
of the incomplete multibyte sequence.

Fixes
mp_msg.c: In function ‘mp_msg’:
mp_msg.c:99: warning: comparison between signed and unsigned

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-20114/mp_msg.c.warn	2006-08-29 23:20:02.000000000 +0200
+++ MPlayer-20114/mp_msg.c	2006-10-08 16:20:24.000000000 +0200
@@ -96,7 +96,7 @@
                ,MSG_CHARSET,mp_msg_charset);
       }else{
       memset(tmp2, 0, MSGSIZE_MAX);
-      while (iconv(msgiconv, &in, &inlen, &out, &outlen) == -1) {
+      while (iconv(msgiconv, &in, &inlen, &out, &outlen) == (size_t)-1) {
         if (!inlen || !outlen)
           break;
         *out++ = *in++;


More information about the MPlayer-dev-eng mailing list