mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-28389 fixup: Fix compiler warnings
hex_to_ascii(): Add #if around the definition to avoid clang -Wunused-function. Avoid GCC 5 -Wconversion with a cast.
This commit is contained in:
parent
c86b1389de
commit
a75ad73545
1 changed files with 4 additions and 1 deletions
|
@ -1223,10 +1223,13 @@ buf_madvise_do_dump()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UNIV_DEBUG
|
||||||
static inline byte hex_to_ascii(byte hex_digit)
|
static inline byte hex_to_ascii(byte hex_digit)
|
||||||
{
|
{
|
||||||
return hex_digit <= 9 ? '0' + hex_digit : ('a' - 10) + hex_digit;
|
const int offset= hex_digit <= 9 ? '0' : 'a' - 10;
|
||||||
|
return byte(hex_digit + offset);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Dump a page to stderr.
|
/** Dump a page to stderr.
|
||||||
@param[in] read_buf database page
|
@param[in] read_buf database page
|
||||||
|
|
Loading…
Add table
Reference in a new issue