Skip to content

Commit 3262e44

Browse files
zmurdahlerlend
authored andcommitted
Bug#33976268 NDB: gcc 11 Ubuntu 21.10 : build stops with [-Werror=maybe-uninitialized]
LTO phase falsely reported error due to Wmaybe-uninitialized in function read_row in NdbInfoScanVirtual.cpp. Change-Id: I7be0e5f6be3ad6015e89df0f5335f7cfc18ca887
1 parent 7c11e49 commit 3262e44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/ndb/src/ndbapi/NdbInfoScanVirtual.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,6 @@ class DictionaryTablesTable : public VirtualTable {
14451445
NdbDictionary::HashMap hashMap;
14461446
char pk_cols[column_buff_size];
14471447
size_t s = 0;
1448-
Uint32 tablespace_id;
14491448

14501449
// Get value for column "dynamic"
14511450
int is_dynamic = [t]() {
@@ -1465,7 +1464,8 @@ class DictionaryTablesTable : public VirtualTable {
14651464
}
14661465

14671466
// Get tablespace ID
1468-
bool has_ts = t->getTablespace(&tablespace_id);
1467+
Uint32 tablespace_id;
1468+
if (!t->getTablespace(&tablespace_id)) tablespace_id = 0;
14691469

14701470
w.write_string(elem->database); // database
14711471
w.write_string(t->getName()); // name
@@ -1483,7 +1483,7 @@ class DictionaryTablesTable : public VirtualTable {
14831483
w.write_number(t->getRowSizeInBytes()); // row_size
14841484
w.write_number64(t->getMinRows()); // min_rows
14851485
w.write_number64(t->getMaxRows()); // max_rows
1486-
w.write_number(has_ts ? tablespace_id : 0); // tablespace
1486+
w.write_number(tablespace_id); // tablespace
14871487
w.write_number((int) t->getFragmentType()); // fragment_type
14881488
w.write_string(hashMap.getName()); // hash_map
14891489
w.write_number(t->getFragmentCount()); // fragments

0 commit comments

Comments
 (0)