From 99df7ced5d6f42a2c164b4875b557d89a12c5b5b Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Wed, 14 Aug 2024 01:55:56 +0800 Subject: [PATCH] security: Remove unnecessary std::move Moving a temporary object prevents copy elision, and could reduce performance. This fixes -Wpessimizing-move compiler warning. Test: presubmit Bug: 154270751 Change-Id: I378f1b9029f1a0711728ff14e4071263ad330504 --- security/keymint/support/fuzzer/keymint_attestation_fuzzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/keymint/support/fuzzer/keymint_attestation_fuzzer.cpp b/security/keymint/support/fuzzer/keymint_attestation_fuzzer.cpp index bd781acb30..1757997453 100644 --- a/security/keymint/support/fuzzer/keymint_attestation_fuzzer.cpp +++ b/security/keymint/support/fuzzer/keymint_attestation_fuzzer.cpp @@ -151,7 +151,7 @@ void KeyMintAttestationFuzzer::process() { extern "C" int LLVMFuzzerInitialize(int /* *argc */, char /* ***argv */) { ::ndk::SpAIBinder binder(AServiceManager_waitForService(kServiceName.c_str())); - gKeyMint = std::move(IKeyMintDevice::fromBinder(binder)); + gKeyMint = IKeyMintDevice::fromBinder(binder); LOG_ALWAYS_FATAL_IF(!gKeyMint, "Failed to get IKeyMintDevice instance."); return 0; }