Skip to content

Commit

Permalink
MDEV-28389 fixup: Fix compiler warnings
Browse files Browse the repository at this point in the history
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.
5 changes: 4 additions & 1 deletion storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a75ad73

Please sign in to comment.