From 5fce3a1cbe0dcebca96b640a64fcdf299fc9f3b2 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 23 Apr 2020 14:26:21 -0700 Subject: [PATCH] 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 --- uncrypt/uncrypt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp index f1f4f69f..c798e31d 100644 --- a/uncrypt/uncrypt.cpp +++ b/uncrypt/uncrypt.cpp @@ -477,9 +477,9 @@ static int Uncrypt(const std::string& input_path, const std::string& map_file, i 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;