Skip to content
Permalink
Browse files
MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_tabl…
…e.cc and ha_spider.cc

The warning "maybe-uninitialized" raises on spd_sys_table.cc and
ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.
  • Loading branch information
nayuta-yanagisawa committed Sep 26, 2022
1 parent fa4e84b commit 2b89598
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
@@ -348,7 +348,7 @@ int ha_spider::open(
may_be_clone = FALSE;
ha_spider **pt_handler_share_handlers;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
my_hash_value_type hash_value;
my_hash_value_type hash_value = 0;
#endif
#endif
DBUG_ENTER("ha_spider::open");
@@ -425,7 +425,9 @@ int ha_spider::open(
partition_handler_share->between_flg = FALSE;
partition_handler_share->idx_bitmap_is_set = FALSE;
partition_handler_share->rnd_bitmap_is_set = FALSE;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
partition_handler_share->table_hash_value = hash_value;
#endif
partition_handler_share->creator = this;
partition_handler_share->parallel_search_query_id = 0;
pt_handler_share_creator = this;
@@ -950,12 +950,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));

0 comments on commit 2b89598

Please sign in to comment.