Fix clang-analyzer-core.uninitialized.Branch warnings
Bug: 154760495
Test: make with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=clang-analyzer-core.uninitialized.Branch
Change-Id: I03af58f9491f4abcface9abb12c80a35e0f97a40
diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp
index f1f4f69..c798e31 100644
--- a/uncrypt/uncrypt.cpp
+++ b/uncrypt/uncrypt.cpp
@@ -477,9 +477,9 @@
return kUncryptRealpathFindError;
}
- bool encryptable;
- bool encrypted;
- bool f2fs_fs;
+ bool encryptable = false;
+ bool encrypted = false;
+ bool f2fs_fs = false;
const std::string blk_dev = FindBlockDevice(path, &encryptable, &encrypted, &f2fs_fs);
if (blk_dev.empty()) {
LOG(ERROR) << "Failed to find block device for " << path;