Fixed compiler issues when compiling with UBSAN

Updated also BUILD/compile-pentium64-ubsan to use -Wno-unused-parameter
to get rid of compiler warnings
This commit is contained in:
Monty 2025-05-28 14:43:35 +03:00
commit 0ec675ce89
4 changed files with 6 additions and 6 deletions

View file

@ -83,12 +83,12 @@ lock_rec_set_nth_bit(
byte_index = i / 8;
bit_index = i % 8;
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 6
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 8
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wconversion" /* GCC 4 and 5 need this here */
#endif
((byte*) &lock[1])[byte_index] |= static_cast<byte>(1 << bit_index);
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 6
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 8
# pragma GCC diagnostic pop
#endif
#ifdef SUX_LOCK_GENERIC