Skip to content

Commit

Permalink
[compilation] PS-9380: Fix clang-12+ compilation issues
Browse files Browse the repository at this point in the history
```
../../../storage/innobase/btr/btr0mtib.cc:962:36: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
  auto guard = create_scope_guard([this, page_no]() {
                                   ^~~~~
../../../storage/innobase/btr/btr0mtib.cc:962:42: error: lambda capture 'page_no' is not used [-Werror,-Wunused-lambda-capture]
  auto guard = create_scope_guard([this, page_no]() {
                                       ~~^~~~~~~
```
  • Loading branch information
inikep committed Sep 11, 2024
1 parent 375fa97 commit b720c0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/innobase/btr/btr0mtib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ dberr_t Page_load::init_mem_blob(const page_no_t page_no,
ut_ad(page_no < page_extent->m_range.second);
ut_ad(m_heap == nullptr);

#ifndef NDEBUG
auto guard = create_scope_guard([this, page_no]() {
ut_ad(m_block != nullptr);
ut_ad(m_mtr == nullptr);
Expand All @@ -967,6 +968,7 @@ dberr_t Page_load::init_mem_blob(const page_no_t page_no,
ut_ad(m_page_no != FIL_NULL);
ut_ad(m_page_no == page_no);
});
#endif

m_page_extent = page_extent;
m_page_no = page_no;
Expand Down

0 comments on commit b720c0f

Please sign in to comment.