From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: load_charset warning Date: Fri, 01 May 2009 19:56:23 +0900 Message-ID: References: <20090501104053.GB37259@orion.local> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1241175493 18343 80.91.229.12 (1 May 2009 10:58:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2009 10:58:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Emanuele Giaquinta Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 01 12:58:03 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LzqRO-0003aG-Rw for ged-emacs-devel@m.gmane.org; Fri, 01 May 2009 12:58:03 +0200 Original-Received: from localhost ([127.0.0.1]:45081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzqRO-0008UJ-Dk for ged-emacs-devel@m.gmane.org; Fri, 01 May 2009 06:58:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LzqPx-0007Lm-HL for emacs-devel@gnu.org; Fri, 01 May 2009 06:56:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LzqPs-0007Ii-PZ for emacs-devel@gnu.org; Fri, 01 May 2009 06:56:33 -0400 Original-Received: from [199.232.76.173] (port=33030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzqPs-0007IP-9i for emacs-devel@gnu.org; Fri, 01 May 2009 06:56:28 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:44740) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LzqPr-0000ke-G8 for emacs-devel@gnu.org; Fri, 01 May 2009 06:56:28 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n41AuN8X024787; Fri, 1 May 2009 19:56:23 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n41AuN7Z020971; Fri, 1 May 2009 19:56:23 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id n41AuN0J005714; Fri, 1 May 2009 19:56:23 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LzqPn-0003M3-N1; Fri, 01 May 2009 19:56:23 +0900 In-reply-to: <20090501104053.GB37259@orion.local> (message from Emanuele Giaquinta on Fri, 1 May 2009 12:40:53 +0200) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110583 Archived-At: In article <20090501104053.GB37259@orion.local>, Emanuele Giaquinta writes: > gcc emits the following warning for charset.c:load_charset: > charset.c: In function 'load_charset': > charset.c:649: warning: comparisons like X<=Y<=Z do not have their mathematical meaning > Since the code seems correct, i'd suggest the attached patch to > improve readability (and avoid the warning). Thank you. I committed your change. --- Kenichi Handa handa@m17n.org > diff --git a/src/charset.c b/src/charset.c > index 15975a4..107647f 100644 > --- a/src/charset.c > +++ b/src/charset.c > @@ -646,7 +646,7 @@ load_charset (charset, control_flag) > if (inhibit_load_charset_map > && temp_charset_work > && charset == temp_charset_work->current > - && (control_flag == 2 == temp_charset_work->for_encoder)) > + && ((control_flag == 2) == temp_charset_work->for_encoder)) > return; > if (CHARSET_METHOD (charset) == CHARSET_METHOD_MAP)