Commit dd570869 authored by Georgi Kodinov's avatar Georgi Kodinov

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).
parent 22454390
...@@ -59,7 +59,8 @@ ...@@ -59,7 +59,8 @@
#define largest_char 255 /* Largest character value. */ #define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) #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 CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit) #define META(c) ((c) | meta_character_bit)
......
...@@ -1888,7 +1888,7 @@ rl_character_len (c, pos) ...@@ -1888,7 +1888,7 @@ rl_character_len (c, pos)
uc = (unsigned char)c; uc = (unsigned char)c;
if (META_CHAR (c)) if (META_BYTE (uc))
return ((_rl_output_meta_chars == 0) ? 4 : 1); return ((_rl_output_meta_chars == 0) ? 4 : 1);
if (uc == '\t') if (uc == '\t')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment