From: David Levine Date: Tue, 26 Aug 2014 00:29:34 +0000 (-0500) Subject: Added size_t cast of another MB_CUR_MAX to silence the compiler X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d3e4441e5663116c5956e9461bec6710d2c1fef0?ds=inline;hp=-c Added size_t cast of another MB_CUR_MAX to silence the compiler on FreeBSD 9. --- d3e4441e5663116c5956e9461bec6710d2c1fef0 diff --git a/sbr/charstring.c b/sbr/charstring.c index 2119be97..cc2e907e 100644 --- a/sbr/charstring.c +++ b/sbr/charstring.c @@ -166,8 +166,9 @@ charstring_last_char_len (const charstring_t s) { while (*sp && remaining > 0) { wchar_t wide_char; - len = mbtowc (&wide_char, sp, - (size_t) MB_CUR_MAX < remaining ? MB_CUR_MAX : remaining); + len = mbtowc (&wide_char, sp, (size_t) MB_CUR_MAX < remaining + ? (size_t) MB_CUR_MAX + : remaining); sp += len > 0 ? len : 1; remaining -= len > 0 ? len : 1; }