all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: load_charset warning
Date: Fri, 1 May 2009 12:40:53 +0200	[thread overview]
Message-ID: <20090501104053.GB37259@orion.local> (raw)

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Hi,

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).

Emanuele Giaquinta

[-- Attachment #2: load_charset.diff --]
[-- Type: text/x-diff, Size: 480 bytes --]

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)

             reply	other threads:[~2009-05-01 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01 10:40 Emanuele Giaquinta [this message]
2009-05-01 10:56 ` load_charset warning Kenichi Handa
2009-05-01 11:06   ` Emanuele Giaquinta
2009-05-01 12:17     ` Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090501104053.GB37259@orion.local \
    --to=emanuele.giaquinta@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.