Skip to content

Commit 1c554ae

Browse files
committed
Enable clang-analyzer-deadcode.DeadStores
1 parent ed7aaaf commit 1c554ae

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

base/cvd/.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ WarningsAsErrors: >
77
clang-analyzer-*,
88
-clang-analyzer-core.uninitialized.Assign,
99
-clang-analyzer-core.UndefinedBinaryOperatorResult,
10-
-clang-analyzer-deadcode.DeadStores,
1110
clang-diagnostic-*,
1211
-clang-diagnostic-pragma-once-outside-header,
1312
-clang-diagnostic-unused-const-variable,

base/cvd/cuttlefish/common/libs/utils/files.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ bool IsDirectoryEmpty(const std::string& path) {
246246
return false;
247247
}
248248

249-
decltype(::readdir(direc)) sub = nullptr;
250249
int cnt {0};
251-
while ( (sub = ::readdir(direc)) ) {
250+
while (::readdir(direc)) {
252251
cnt++;
253252
if (cnt > 2) {
254253
LOG(ERROR) << "IsDirectoryEmpty test failed with " << path

base/cvd/cuttlefish/host/commands/cvd/cli/commands/cmd_list.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class CvdCmdlistHandler : public CvdServerHandler {
4343

4444
CF_EXPECT(CanHandle(request));
4545

46-
auto [subcmd, subcmd_args] = ParseInvocation(request);
4746
const auto subcmds = executor_.CmdList();
4847

4948
std::vector<std::string> subcmds_vec{subcmds.begin(), subcmds.end()};

0 commit comments

Comments
 (0)