Fix return-stack-address warning
Apply the same fix as https://r.android.com/2462896 to keymaster/4.0/vts/performance/Benchmark.cpp Test: presubmit Bug: 271241374 Change-Id: Ib0d2a3a523491d0522f5b3dd031cdde46f88a165
This commit is contained in:
parent
550964e884
commit
1a39569491
1 changed files with 3 additions and 3 deletions
|
@ -315,7 +315,7 @@ class KeymasterWrapper {
|
||||||
|
|
||||||
SecurityLevel getSecurityLevel() { return securityLevel_; }
|
SecurityLevel getSecurityLevel() { return securityLevel_; }
|
||||||
|
|
||||||
const string& GenerateMessage(int size) {
|
const string GenerateMessage(int size) {
|
||||||
for (const string& message : message_cache_) {
|
for (const string& message : message_cache_) {
|
||||||
if (message.size() == size) {
|
if (message.size() == size) {
|
||||||
return message;
|
return message;
|
||||||
|
@ -323,7 +323,7 @@ class KeymasterWrapper {
|
||||||
}
|
}
|
||||||
string message = string(size, 'x');
|
string message = string(size, 'x');
|
||||||
message_cache_.push_back(message);
|
message_cache_.push_back(message);
|
||||||
return std::move(message);
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
optional<BlockMode> getBlockMode(string transform) {
|
optional<BlockMode> getBlockMode(string transform) {
|
||||||
|
@ -714,4 +714,4 @@ int main(int argc, char** argv) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
::benchmark::RunSpecifiedBenchmarks();
|
::benchmark::RunSpecifiedBenchmarks();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue