Merge "[cleanup] Enable clang-tidy and fix warnings" into rvc-dev am: defa83d8d9 am: a0b896e26c

Change-Id: Ie3bed38d7f113992f94e8850b1e15c20aae87cb3
This commit is contained in:
TreeHugger Robot
2020-04-23 09:03:29 +00:00
committed by Automerger Merge Worker
3 changed files with 17 additions and 2 deletions

View File

@@ -19,6 +19,21 @@ cc_defaults {
proto: { proto: {
type: "lite", type: "lite",
}, },
tidy: true,
tidy_checks: [
"android-*",
"cert-*",
"clang-analyzer-security*",
"-cert-err34-c",
"clang-analyzer-security*",
// Disabling due to many unavoidable warnings from POSIX API usage.
"-google-runtime-int",
"-google-explicit-constructor",
// do not define variadic C function - JNI headers
"-cert-dcl50-cpp",
// operator=() does not handle self-assignment properly - all protobuf-generated classes
"-cert-oop54-cpp",
],
} }
cc_defaults { cc_defaults {

View File

@@ -1395,7 +1395,7 @@ bool IncrementalService::configureNativeBinaries(StorageId storage, std::string_
auto startFileTs = Clock::now(); auto startFileTs = Clock::now();
const auto libName = path::basename(fileName); const auto libName = path::basename(fileName);
const auto targetLibPath = path::join(libDirRelativePath, libName); auto targetLibPath = path::join(libDirRelativePath, libName);
const auto targetLibPathAbsolute = normalizePathToStorage(*ifs, storage, targetLibPath); const auto targetLibPathAbsolute = normalizePathToStorage(*ifs, storage, targetLibPath);
// If the extract file already exists, skip // If the extract file already exists, skip
if (access(targetLibPathAbsolute.c_str(), F_OK) == 0) { if (access(targetLibPathAbsolute.c_str(), F_OK) == 0) {

View File

@@ -36,7 +36,7 @@ static constexpr auto kDataLoaderManagerName = "dataloader_manager"sv;
class RealVoldService : public VoldServiceWrapper { class RealVoldService : public VoldServiceWrapper {
public: public:
RealVoldService(const sp<os::IVold> vold) : mInterface(std::move(vold)) {} RealVoldService(sp<os::IVold> vold) : mInterface(std::move(vold)) {}
~RealVoldService() = default; ~RealVoldService() = default;
binder::Status mountIncFs( binder::Status mountIncFs(
const std::string& backingPath, const std::string& targetDir, int32_t flags, const std::string& backingPath, const std::string& targetDir, int32_t flags,