From a75ad73545cbf3f02355af4193fb4e199290c48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 27 Jun 2022 14:50:00 +0300 Subject: [PATCH] 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. --- storage/innobase/buf/buf0buf.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 70ee0f58dc2..6a859f3293a 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -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