Skip to content
Permalink
Browse files
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.
  • Loading branch information
dr-m committed Jun 27, 2022
1 parent c86b138 commit a75ad73
Showing 1 changed file with 4 additions and 1 deletion.
@@ -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

0 comments on commit a75ad73

Please sign in to comment.