Fix OEMCrypto test issues identified by Coverity
Change-Id: Ic9f4982bf022292d10a0a88f10648a46077ec0cf
This commit is contained in:
@@ -359,7 +359,7 @@ TEST_F(OEMCryptoClientTest, CheckJsonBuildInformationAPI18) {
|
||||
// check for existence in map
|
||||
// check if value matches expectation
|
||||
// remove from map
|
||||
for (int i = 0; i < jsmn_result; i++) {
|
||||
for (int32_t i = 0; i < jsmn_result; i++) {
|
||||
jsmntok_t token = tokens[i];
|
||||
std::string key = build_info.substr(token.start, token.end - token.start);
|
||||
if (expected.find(key) != expected.end()) {
|
||||
@@ -372,7 +372,7 @@ TEST_F(OEMCryptoClientTest, CheckJsonBuildInformationAPI18) {
|
||||
// if map is not empty, return false
|
||||
if (expected.size() > 0) {
|
||||
std::string missing;
|
||||
for (auto e : expected) {
|
||||
for (const auto& e : expected) {
|
||||
missing.append(e.first);
|
||||
missing.append(" ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user