Skip to content
Permalink
Browse files
MDEV-28389 fixup: Fix pre-GCC 10 -Wconversion
Before version 10, GCC would think that a right shift of an
unsigned char returns int. Let us explicitly cast that back,
to silence a bogus -Wconversion warning.
  • Loading branch information
dr-m committed Jul 1, 2022
1 parent 045771c commit 7c35ad1
Showing 1 changed file with 4 additions and 1 deletion.
@@ -1247,7 +1247,10 @@ void buf_page_print(const byte *read_buf, const page_size_t &page_size)
byte row[64];

for (byte *r= row; r != &row[64]; r+= 2, read_buf++)
r[0]= hex_to_ascii(*read_buf >> 4), r[1]= hex_to_ascii(*read_buf & 15);
{
r[0]= hex_to_ascii(byte(*read_buf >> 4));
r[1]= hex_to_ascii(*read_buf & 15);
}

sql_print_information("InnoDB: %.*s", 64, row);
}

0 comments on commit 7c35ad1

Please sign in to comment.