From: Rocco Rutte Date: Tue, 13 Nov 2007 12:31:01 +0000 (+0100) Subject: Fix compiler warnings in new wcwidth.c (too large values for 'unsigned short') X-Git-Tag: mutt-1-5-18-rel~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=757f6b32ecba73039357d14b06b344bfa6c4ed24;p=mutt Fix compiler warnings in new wcwidth.c (too large values for 'unsigned short') --- diff --git a/wcwidth.c b/wcwidth.c index 1bd35ae4..0b94d736 100644 --- a/wcwidth.c +++ b/wcwidth.c @@ -14,7 +14,10 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ -/* Adapted for Mutt by Edmund Grimley Evans. +/* Changes made for mutt: + * - Adapted for Mutt by Edmund Grimley Evans. + * - Changed 'first'/'last' members of combined[] to wchar_t from + * unsigned short to fix compiler warnings, 2007-11-13, Rocco Rutte */ #if HAVE_CONFIG_H @@ -65,8 +68,8 @@ int wcwidth_ucs(wchar_t ucs) /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ static const struct interval { - unsigned short first; - unsigned short last; + wchar_t first; + wchar_t last; } combining[] = { { 0x0300, 0x036f }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, { 0x0591, 0x05bd }, { 0x05bf, 0x05bf }, { 0x05c1, 0x05c2 },