Commit 4735eafc authored by Sunny Bains's avatar Sunny Bains

Bug #57588 - Compiler warning in InnoDB due to comparison between signed and unsigned

            
For DATA_MBMINLEN(), cast the result of UNIV_EXPECT to ulint because in GCC
it returns a long causing unsigned/signed comparison warnings.

Approved by Jimmy Yang on IM.
parent 923003f9
...@@ -174,8 +174,11 @@ store the charset-collation number; one byte is left unused, though */ ...@@ -174,8 +174,11 @@ store the charset-collation number; one byte is left unused, though */
/* Pack mbminlen, mbmaxlen to mbminmaxlen. */ /* Pack mbminlen, mbmaxlen to mbminmaxlen. */
#define DATA_MBMINMAXLEN(mbminlen, mbmaxlen) \ #define DATA_MBMINMAXLEN(mbminlen, mbmaxlen) \
((mbmaxlen) * DATA_MBMAX + (mbminlen)) ((mbmaxlen) * DATA_MBMAX + (mbminlen))
/* Get mbminlen from mbminmaxlen. */ /* Get mbminlen from mbminmaxlen. Cast the result of UNIV_EXPECT to ulint
#define DATA_MBMINLEN(mbminmaxlen) UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), 1) because in GCC it returns a long. */
#define DATA_MBMINLEN(mbminmaxlen) ((ulint) \
UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), \
1))
/* Get mbmaxlen from mbminmaxlen. */ /* Get mbmaxlen from mbminmaxlen. */
#define DATA_MBMAXLEN(mbminmaxlen) ((mbminmaxlen) / DATA_MBMAX) #define DATA_MBMAXLEN(mbminmaxlen) ((mbminmaxlen) / DATA_MBMAX)
......
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