Explicitly ignore the result of std::async

The newer libc++ marks std::async with [[nodiscard]] in C++20 mode.

Bug: b/175635923
Test: treehugger
Change-Id: Ib63259983d952b97cf1b1c6c243c831cb72f9724
This commit is contained in:
Ryan Prichard 2023-07-21 15:21:28 -07:00
parent 435b520bf0
commit c5184f79ee

View file

@ -734,8 +734,8 @@ void Snapuserd::ReadBlocks(const std::string& partition_name, const std::string&
off_t offset = 0;
for (int i = 0; i < num_threads; i++) {
std::async(std::launch::async, &Snapuserd::ReadBlocksToCache, this, dm_block_device,
partition_name, offset, read_sz_per_thread);
(void)std::async(std::launch::async, &Snapuserd::ReadBlocksToCache, this, dm_block_device,
partition_name, offset, read_sz_per_thread);
offset += read_sz_per_thread;
}