Skip to content

Commit 4fffc98

Browse files
authored
Enable 'cppcoreguidelines-init-variables' clang-tidy check (#298)
1 parent 48342c2 commit 4fffc98

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Checks: >
22
bugprone-*,
33
clang-diagnostic-*,
4+
cppcoreguidelines-init-variables,
45
llvm-include-order,
56
llvm-namespace-comment,
67
misc-*,

modules/ref/max_of_vector_elements/include/ref_task.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class MaxOfVectorElements : public ppc::core::Task {
2727
}
2828

2929
bool ValidationImpl() override {
30-
bool is_count_values_correct;
31-
bool is_count_indexes_correct;
30+
bool is_count_values_correct = false;
31+
bool is_count_indexes_correct = false;
3232
// Check count elements of output
3333
is_count_values_correct = task_data->outputs_count[0] == 1;
3434
is_count_indexes_correct = task_data->outputs_count[1] == 1;

modules/ref/min_of_vector_elements/include/ref_task.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class MinOfVectorElements : public ppc::core::Task {
2727
}
2828

2929
bool ValidationImpl() override {
30-
bool is_count_values_correct;
31-
bool is_count_indexes_correct;
30+
bool is_count_values_correct = false;
31+
bool is_count_indexes_correct = false;
3232
// Check count elements of output
3333
is_count_values_correct = task_data->outputs_count[0] == 1;
3434
is_count_indexes_correct = task_data->outputs_count[1] == 1;

0 commit comments

Comments
 (0)