summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Krzysztof Kosiński <krzysio@google.com> 2022-09-25 08:10:06 +0000
committer Krzysztof Kosiński <krzysio@google.com> 2022-09-25 08:12:47 +0000
commite98eb9e6fec80e4c19fa23ee0c5049db6cab06f4 (patch)
tree5c157f57f0e2fa34ef8c247c62d003d1e709381e
parent8ca6061a15e6097e350a5c65385d573e8182c29a (diff)
Explicitly discard released proto strings.
In newer releases of the protobuf library, the release_* methods are marked [[nodiscard]], which causes a compilation error here. Bug: 203713560 Test: presubmit Change-Id: I44a9d52730bdc199e34cb25be959a955fff8f128
-rw-r--r--services/incremental/IncrementalService.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 6196c49c88ce..9c9b363b948e 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -1287,8 +1287,8 @@ int IncrementalService::addBindMount(IncFsMount& ifs, StorageId storage,
bp.set_allocated_dest_path(&target);
bp.set_allocated_source_subdir(&source);
const auto metadata = bp.SerializeAsString();
- bp.release_dest_path();
- bp.release_source_subdir();
+ static_cast<void>(bp.release_dest_path());
+ static_cast<void>(bp.release_source_subdir());
mdFileName = makeBindMdName();
metadataFullPath = path::join(ifs.root, constants().mount, mdFileName);
auto node = mIncFs->makeFile(ifs.control, metadataFullPath, 0444, idFromMetadata(metadata),