Unverified Commit 36cf8fe0 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Migrate klocwork fixes from r0.17 (#2700)

parent 7ae82a50
...@@ -192,8 +192,8 @@ protected: ...@@ -192,8 +192,8 @@ protected:
float lower_bound; float lower_bound;
float past_upper_bound; float past_upper_bound;
float past_lower_bound; float past_lower_bound;
float min_signal_too_low; float min_signal_too_low{0};
float min_signal_enables_passing; float min_signal_enables_passing{0};
}; };
TEST_P(all_close_f_param_test, test_boundaries) TEST_P(all_close_f_param_test, test_boundaries)
...@@ -349,8 +349,8 @@ protected: ...@@ -349,8 +349,8 @@ protected:
double lower_bound; double lower_bound;
double past_upper_bound; double past_upper_bound;
double past_lower_bound; double past_lower_bound;
double min_signal_too_low; double min_signal_too_low{0};
double min_signal_enables_passing; double min_signal_enables_passing{0};
}; };
TEST_P(all_close_f_double_param_test, test_boundaries) TEST_P(all_close_f_double_param_test, test_boundaries)
......
...@@ -40,12 +40,15 @@ using namespace std; ...@@ -40,12 +40,15 @@ using namespace std;
bool static is_codegen_mode() bool static is_codegen_mode()
{ {
if (std::getenv("NGRAPH_CODEGEN") != nullptr && static bool codegen_set = false;
std::string(std::getenv("NGRAPH_CODEGEN")) != "0") static bool codegen_mode = false;
if (!codegen_set)
{ {
return true; const char* ngraph_codegen = std::getenv("NGRAPH_CODEGEN");
codegen_mode = (ngraph_codegen != nullptr) && std::string(ngraph_codegen) != "0";
codegen_set = true;
} }
return false; return codegen_mode;
} }
// These tests are for DEX mode only. // These tests are for DEX mode only.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment