lib/nfs/Connection: suppress bogus clang warning

We do need to capture "this" because we use "this->active_leases", but
clang 18 is too dumb to understand this.
This commit is contained in:
Max Kellermann 2024-05-13 18:11:14 +02:00
parent dcde2a0bae
commit 64c291ba78
1 changed files with 5 additions and 0 deletions

View File

@ -587,6 +587,11 @@ NfsConnection::BroadcastMountSuccess() noexcept
assert(mount_state == MountState::FINISHED);
new_leases.clear_and_dispose([this](auto *lease){
#ifdef __clang__
/* suppress bogus clang-18 -Wunused-lambda-capture warning */
(void)this;
#endif
active_leases.push_back(*lease);
lease->OnNfsConnectionReady();
});