summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2023-07-20 20:52:45 -0700
committer Ryan Prichard <rprichard@google.com> 2023-07-25 21:35:18 -0700
commitc8512110f3c41e79ae6aaca496fe28ffb288f1e7 (patch)
treece4d15491202cedd0fcb44a8e15ce001d7302664
parent39a9427c02c1bb30434e532f0053d436aedf85b2 (diff)
RESTRICT AUTOMERGE: 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: Ia222778697ab4241f25e002073b3514c7e106007
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8c46515bf1..64348a544c 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -6755,7 +6755,7 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::captureScreenCommon(
if (captureListener) {
// TODO: The future returned by std::async blocks the main thread. Return a chain of
// futures to the Binder thread instead.
- std::async([=]() mutable {
+ (void)std::async([=]() mutable {
ATRACE_NAME("captureListener is nonnull!");
auto fenceResult = renderFuture.get();
// TODO(b/232535621): Change ScreenCaptureResults to store a FenceResult.