clean warnings from cpp_check

Match-id-e615b2e0a3d62cc2bb86fd0e19b89da10fc3cc9c
This commit is contained in:
lihehe 2023-05-22 22:14:36 +08:00
parent 266210ec27
commit 81e79495b3
2 changed files with 3 additions and 7 deletions

View File

@ -63,10 +63,6 @@ int32_t CodeSignUtils::EnforceCodeSignForApp(const EntryMap &entryPath,
}
std::unique_ptr<AbilityBase::Extractor> extractor = std::make_unique<AbilityBase::Extractor>(signatureFile);
if (extractor == nullptr) {
LOG_ERROR(LABEL, "Create extractor for signature file failed.");
return CS_ERR_EXTRACT_FILES;
}
std::vector<std::string> signatureFileList;
if (!extractor->Init()) {
LOG_ERROR(LABEL, "Init extractor failed.");
@ -94,7 +90,7 @@ int32_t CodeSignUtils::EnforceCodeSignForApp(const EntryMap &entryPath,
LOG_ERROR(LABEL, "Extract signture failed.");
return CS_ERR_EXTRACT_FILES;
}
int ret = EnforceCodeSignForFile(targetFile, signatureBuffer.get(), signatureSize);
ret = EnforceCodeSignForFile(targetFile, signatureBuffer.get(), signatureSize);
if (ret != CS_SUCCESS) {
return ret;
}
@ -180,4 +176,4 @@ int32_t CodeSignUtils::EnforceCodeSignForFile(const std::string &path, const uin
}
}
}
}
}

View File

@ -34,7 +34,7 @@ KeySerial AddKey(
KeySerial ringId)
{
KeySerial ret = syscall(__NR_add_key,
type, description, (const void *)payload,
type, description, static_cast<const void *>(payload),
pLen, ringId);
if (ret < 0) {
LOG_ERROR(LABEL, "Add certificate failed, errno = <%{public}d, %{public}s>",