diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-27 14:50:00 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-27 14:50:00 +0300 |
commit | a75ad73545cbf3f02355af4193fb4e199290c48f (patch) | |
tree | 02ab8ad29813b89d9e8c87cf1da93867c1527a31 | |
parent | c86b1389de5fe44fbd659bb50d95017bc19324a5 (diff) | |
download | mariadb-git-a75ad73545cbf3f02355af4193fb4e199290c48f.tar.gz |
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.
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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 |