Commit a75ad735 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent c86b1389
......@@ -1223,10 +1223,13 @@ buf_madvise_do_dump()
}
#endif
#ifndef UNIV_DEBUG
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.
@param[in] read_buf database page
......
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