From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DNS_FROM_OPENWHOIS, SPF_NEUTRAL autolearn=no version=3.2.5 Message-ID: <4CBA0951.4010003@gmail.com> Date: Sun, 17 Oct 2010 00:21:37 +0400 From: Alexey Gladkov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9pre) Gecko/20100815 Lightning/1.0b2pre Thunderbird/3.1.3pre MIME-Version: 1.0 To: kbd@lists.altlinux.org References: <1286982446-15811-1-git-send-email-michi@uiae.at> In-Reply-To: <1286982446-15811-1-git-send-email-michi@uiae.at> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [kbd] [PATCH] Fix "compose as usual" for Unicode diacritics X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Oct 2010 20:21:50 -0000 Archived-At: List-Archive: 13.10.2010 19:07, Michael Schutte wrote: > struct ccc in compose_as_usua[() uses three char members of unspecified > signedness; in case the compiler decides that they should be signed, > negative integers will end up in the accent table for c3 > 127. > > Avoid the problem by explicitly using unsigned chars. > > Signed-off-by: Michael Schutte > --- > src/loadkeys.y | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/loadkeys.y b/src/loadkeys.y > index c8bb7cc..cc7e2ab 100644 > --- a/src/loadkeys.y > +++ b/src/loadkeys.y > @@ -1181,7 +1181,7 @@ compose_as_usual(char *charset) { > exit(1); > } else { > struct ccc { > - char c1, c2, c3; > + unsigned char c1, c2, c3; > } def_latin1_composes[68] = { > { '`', 'A', 0300 }, { '`', 'a', 0340 }, > { '\'', 'A', 0301 }, { '\'', 'a', 0341 }, Indeed. I tried to add the -Wconversion and was horrified (about 368 warnings). -- Rgrds, legion