mirror of
https://gitee.com/openharmony/security_code_signature
synced 2024-11-27 16:30:30 +00:00
clean warnings from cpp_check
Match-id-e615b2e0a3d62cc2bb86fd0e19b89da10fc3cc9c
This commit is contained in:
parent
266210ec27
commit
81e79495b3
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>",
|
||||
|
Loading…
Reference in New Issue
Block a user