summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-14 10:55:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-14 13:36:11 +0300
commita12aed0398a33e113befc25e49967c340f96025f (patch)
tree5a0930e05d5263bf23cbf0ea2380836bc3bbe27f
parent7d51c35988186da89645d9873c5e9386fee0a9fc (diff)
downloadmariadb-git-a12aed0398a33e113befc25e49967c340f96025f.tar.gz
Fix GCC 9.3.0 -Wunused-but-set-variable
-rw-r--r--storage/innobase/btr/btr0cur.cc2
-rw-r--r--storage/innobase/fsp/fsp0fsp.cc7
2 files changed, 5 insertions, 4 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index a187402328f..2bf657f037f 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -3050,7 +3050,7 @@ btr_cur_optimistic_insert(
page_t* page;
rec_t* dummy;
ibool leaf;
- ibool reorg;
+ ibool reorg __attribute__((unused));
ibool inherit = TRUE;
ulint rec_size;
dberr_t err;
diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
index 78d562be9a3..d308ff9de71 100644
--- a/storage/innobase/fsp/fsp0fsp.cc
+++ b/storage/innobase/fsp/fsp0fsp.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -3185,7 +3185,6 @@ fseg_free_extent(
#endif /* BTR_CUR_HASH_ADAPT */
mtr_t* mtr)
{
- ulint first_page_in_extent;
xdes_t* descr;
ulint not_full_n_used;
ulint descr_n_used;
@@ -3200,7 +3199,9 @@ fseg_free_extent(
== FSEG_MAGIC_N_VALUE);
ut_d(space->modify_check(*mtr));
- first_page_in_extent = page - (page % FSP_EXTENT_SIZE);
+#if defined BTR_CUR_HASH_ADAPT || defined UNIV_DEBUG
+ const ulint first_page_in_extent = page - (page % FSP_EXTENT_SIZE);
+#endif /* BTR_CUR_HASH_ADAPT || UNIV_DEBUG */
#ifdef BTR_CUR_HASH_ADAPT
if (ahi) {