mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
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.
This commit is contained in:
parent
e8a709a6c3
commit
bd8343dd27
1 changed files with 5 additions and 2 deletions
|
@ -174,8 +174,11 @@ store the charset-collation number; one byte is left unused, though */
|
|||
/* Pack mbminlen, mbmaxlen to mbminmaxlen. */
|
||||
#define DATA_MBMINMAXLEN(mbminlen, mbmaxlen) \
|
||||
((mbmaxlen) * DATA_MBMAX + (mbminlen))
|
||||
/* Get mbminlen from mbminmaxlen. */
|
||||
#define DATA_MBMINLEN(mbminmaxlen) UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), 1)
|
||||
/* Get mbminlen from mbminmaxlen. Cast the result of UNIV_EXPECT to ulint
|
||||
because in GCC it returns a long. */
|
||||
#define DATA_MBMINLEN(mbminmaxlen) ((ulint) \
|
||||
UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), \
|
||||
1))
|
||||
/* Get mbmaxlen from mbminmaxlen. */
|
||||
#define DATA_MBMAXLEN(mbminmaxlen) ((mbminmaxlen) / DATA_MBMAX)
|
||||
|
||||
|
|
Loading…
Reference in a new issue