diff options
author | Michael Widenius <monty@mariadb.org> | 2021-08-24 23:05:21 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2021-08-24 23:05:21 +0300 |
commit | 497b69493620eaa4cb1f2240a10be85e08a59793 (patch) | |
tree | 043d5eeb0946bfcec38b52fcd7712b90c5ff5cf9 | |
parent | c0a84fb9b0367b4cbd0a8e36d7cb219eb5f919e9 (diff) | |
download | mariadb-git-497b69493620eaa4cb1f2240a10be85e08a59793.tar.gz |
Fixed compile errors when compiling with HAVE_valgrind
-rw-r--r-- | sql/field.cc | 2 | ||||
-rw-r--r-- | storage/innobase/include/srv0mon.h | 2 | ||||
-rw-r--r-- | storage/innobase/page/page0cur.cc | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sql/field.cc b/sql/field.cc index eaa829cd361..cba6df52b62 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7692,7 +7692,7 @@ my_decimal *Field_varstring::val_decimal(my_decimal *decimal_value) #ifdef HAVE_valgrind void Field_varstring::mark_unused_memory_as_defined() { - uint used_length= get_length(); + uint used_length __attribute__((unused)) = get_length(); MEM_MAKE_DEFINED(get_data() + used_length, field_length - used_length); } #endif diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index eaf47789486..3721840f022 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -656,7 +656,7 @@ Use MONITOR_DEC if appropriate mutex protection exists. #ifdef HAVE_valgrind # define MONITOR_CHECK_DEFINED(value) do { \ - mon_type_t m = value; \ + mon_type_t m __attribute__((unused))= value; \ MEM_CHECK_DEFINED(&m, sizeof m); \ } while (0) #else /* HAVE_valgrind */ diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index e4007fca83b..a90195a1b67 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -1299,9 +1299,9 @@ page_cur_insert_rec_low( #ifdef HAVE_valgrind { - const void* rec_start + const void* rec_start __attribute__((unused)) = rec - rec_offs_extra_size(offsets); - ulint extra_size + ulint extra_size __attribute__((unused)) = rec_offs_extra_size(offsets) - (rec_offs_comp(offsets) ? REC_N_NEW_EXTRA_BYTES @@ -1530,9 +1530,9 @@ page_cur_insert_rec_zip( #ifdef HAVE_valgrind { - const void* rec_start + const void* rec_start __attribute__((unused)) = rec - rec_offs_extra_size(offsets); - ulint extra_size + ulint extra_size __attribute__((unused)) = rec_offs_extra_size(offsets) - (rec_offs_comp(offsets) ? REC_N_NEW_EXTRA_BYTES |