summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-09-26 23:17:55 +0900
committerNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-09-26 23:17:55 +0900
commitb83da40b9a5dfc5a76cdb21a3261261e9cbde4fe (patch)
treeb497c23fa433e00da55a0d005ca274a14cbe8497
parentfe7c95ec7833d424b1dcaf64f6c78c74ce0832d6 (diff)
downloadmariadb-git-bb-10.5-MDEV-26852.tar.gz
MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and ha_spider.ccbb-10.5-MDEV-26852
The warning "maybe-uninitialized" raises on spd_sys_table.cc and ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.
-rw-r--r--storage/spider/spd_ping_table.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc
index f220a9d97c2..8c2c8d2ce9e 100644
--- a/storage/spider/spd_ping_table.cc
+++ b/storage/spider/spd_ping_table.cc
@@ -1005,12 +1005,13 @@ int spider_ping_table_cache_compare(
char *db_name, *table_name, *link_id;
DBUG_ENTER("spider_ping_table_cache_compare");
- if (
- !(db_name = get_field(mem_root, table->field[0])) ||
- !(table_name = get_field(mem_root, table->field[1])) ||
- !(link_id = get_field(mem_root, table->field[2]))
- )
+ if (!(db_name = get_field(mem_root, table->field[0])))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!(table_name = get_field(mem_root, table->field[1])))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (!(link_id = get_field(mem_root, table->field[2])))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+
DBUG_PRINT("info", ("spider db_name=%s", db_name));
DBUG_PRINT("info", ("spider table_name=%s", table_name));
DBUG_PRINT("info", ("spider link_id=%s", link_id));