summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/chardefs.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-06-05 18:14:56 +0300
committerGeorgi Kodinov <joro@sun.com>2009-06-05 18:14:56 +0300
commitdd570869f483e5ce6dcd45f3b77e69df585c814a (patch)
treea7ea481953e3f4cb28070fdc02e04ed7e71318d0 /cmd-line-utils/readline/chardefs.h
parent22454390c0ce1c3f90059811548a71ee18cac4f3 (diff)
downloadmariadb-git-dd570869f483e5ce6dcd45f3b77e69df585c814a.tar.gz
Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSX
Implemented a way to circumvent the always true comparison by having nested macros (as suggested on review).
Diffstat (limited to 'cmd-line-utils/readline/chardefs.h')
-rw-r--r--cmd-line-utils/readline/chardefs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-line-utils/readline/chardefs.h b/cmd-line-utils/readline/chardefs.h
index def3a111bd3..36fe7fdd7ac 100644
--- a/cmd-line-utils/readline/chardefs.h
+++ b/cmd-line-utils/readline/chardefs.h
@@ -59,7 +59,8 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
-#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
+#define META_BYTE(c) ((c) > meta_character_threshold)
+#define META_CHAR(c) (META_BYTE(c) && (c) <= largest_char)
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)