From 8611efcdecbfd6b550b47de7febb3c1614398cca Mon Sep 17 00:00:00 2001 From: Denis Kovalchuk Date: Tue, 21 Jul 2026 13:10:54 +0300 Subject: [PATCH] Fix MSVC C4244 warning in utf8proc_charwidth_ambiguous() Building with MSVC produces the following warning: warning C4244: 'return': conversion from 'const unsigned int' to 'utf8proc_bool', possible loss of data In this case, there is no actual loss of data. Add an explicit cast to utf8proc_bool to fix the warning. --- utf8proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utf8proc.c b/utf8proc.c index ad3cae9..8afb11a 100644 --- a/utf8proc.c +++ b/utf8proc.c @@ -433,7 +433,7 @@ UTF8PROC_DLLEXPORT int utf8proc_charwidth(utf8proc_int32_t c) { } UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_charwidth_ambiguous(utf8proc_int32_t c) { - return utf8proc_get_property(c)->ambiguous_width; + return (utf8proc_bool) utf8proc_get_property(c)->ambiguous_width; } UTF8PROC_DLLEXPORT utf8proc_category_t utf8proc_category(utf8proc_int32_t c) {