unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* load_charset warning
@ 2009-05-01 10:40 Emanuele Giaquinta
  2009-05-01 10:56 ` Kenichi Handa
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuele Giaquinta @ 2009-05-01 10:40 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-01 12:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-01 10:40 load_charset warning Emanuele Giaquinta
2009-05-01 10:56 ` Kenichi Handa
2009-05-01 11:06   ` Emanuele Giaquinta
2009-05-01 12:17     ` Kenichi Handa

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).