mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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:
parent
ef2f3d207b
commit
0ec675ce89
4 changed files with 6 additions and 6 deletions
|
|
@ -31,7 +31,7 @@ path=`dirname $0`
|
|||
# the destination
|
||||
#
|
||||
|
||||
extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized"
|
||||
extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized -Wno-unused-parameter"
|
||||
extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
|
|
|||
|
|
@ -1964,12 +1964,12 @@ public:
|
|||
DBUG_ASSERT(fields_nullable);
|
||||
DBUG_ASSERT(field < n_fields);
|
||||
size_t bit= size_t{field} + referenced * n_fields;
|
||||
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 6
|
||||
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 8
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif
|
||||
fields_nullable[bit / 8]|= static_cast<unsigned char>(1 << (bit % 8));
|
||||
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 6
|
||||
#if defined __GNUC__ && !defined __clang__ && __GNUC__ < 8
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ void wsrep_abort_thd(THD *bf_thd,
|
|||
/* Note that when you use RSU node is desynced from cluster, thus WSREP(thd)
|
||||
might not be true.
|
||||
*/
|
||||
if ((WSREP(bf_thd)
|
||||
if ((WSREP_NNULL(bf_thd)
|
||||
|| ((WSREP_ON || bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU)
|
||||
&& wsrep_thd_is_toi(bf_thd))
|
||||
|| bf_thd->lex->sql_command == SQLCOM_KILL)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue