mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Fix g++-12 -O2 -Wstringop-overflow
buf_pool_t::watch_unset(): Reorder some code so that no warning will be emitted in CMAKE_BUILD_TYPE=RelWithDebInfo. It is unclear why invoking watch_is_sentinel() before buf_fix_count() would make the warning disappear.
This commit is contained in:
parent
d62b0368ca
commit
c14f60a72f
1 changed files with 1 additions and 3 deletions
|
|
@ -2383,10 +2383,8 @@ void buf_pool_t::watch_unset(const page_id_t id)
|
|||
page_hash_latch *hash_lock= page_hash.lock<true>(fold);
|
||||
/* The page must exist because watch_set() increments buf_fix_count. */
|
||||
buf_page_t *w= page_hash_get_low(id, fold);
|
||||
const auto buf_fix_count= w->buf_fix_count();
|
||||
ut_ad(buf_fix_count);
|
||||
const bool must_remove= buf_fix_count == 1 && watch_is_sentinel(*w);
|
||||
ut_ad(w->in_page_hash);
|
||||
const bool must_remove= watch_is_sentinel(*w) && w->buf_fix_count() == 1;
|
||||
if (!must_remove)
|
||||
w->unfix();
|
||||
hash_lock->write_unlock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue