Skip to content

Commit b953370

Browse files
laurynas-biveinisinikep
authored andcommitted
Fix clang 15 -Wunused-but-set-variable warnings in MyRocks (percona#1304)
Upstream commit ID: facebook/mysql-5.6@4475c80 PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951) Summary: - Make infinite debug loop counter volatile. Otherwise it's undefined behavior and/or the loop might be optimized away. - Remove another write-only variable Pull Request resolved: facebook/mysql-5.6#1304 Reviewed By: hermanlee Differential Revision: D45446127 Pulled By: sunshine-Chun fbshipit-source-id: c0dfddfa76b4004ae61d62b5de305cb3264afb1c
1 parent 36b6127 commit b953370

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13167,7 +13167,6 @@ static int read_stats_from_ssts(
1316713167
}
1316813168
}
1316913169

13170-
int num_sst [[maybe_unused]] = 0;
1317113170
for (const auto &it : props) {
1317213171
std::vector<Rdb_index_stats> sst_stats;
1317313172
Rdb_tbl_prop_coll::read_stats_from_tbl_props(it.second, &sst_stats);
@@ -13197,7 +13196,6 @@ static int read_stats_from_ssts(
1319713196
(*stats)[it1.m_gl_index_id].merge(
1319813197
it1, true, it_index->second->max_storage_fmt_length());
1319913198
}
13200-
num_sst++;
1320113199
}
1320213200

1320313201
DBUG_RETURN(HA_EXIT_SUCCESS);

0 commit comments

Comments
 (0)