diff --git a/src_c/IMB_exchange.c b/src_c/IMB_exchange.c index ca2ead4..85d1025 100644 --- a/src_c/IMB_exchange.c +++ b/src_c/IMB_exchange.c @@ -107,7 +107,7 @@ Output variables: int s_num = 0, r_num = 0; int s_tag, r_tag; - int left, right; + int left = 0, right = 0; MPI_Status stat[2]; MPI_Request request[2]; diff --git a/src_c/IMB_output.c b/src_c/IMB_output.c index bad342b..260277e 100644 --- a/src_c/IMB_output.c +++ b/src_c/IMB_output.c @@ -139,7 +139,7 @@ Input variables: 3 numbers (min/max/average) */ - double scaled_time[MAX_TIME_ID]; + double scaled_time[MAX_TIME_ID] = {0}; int i, i_gr; int out_format; diff --git a/src_cpp/MPI1/MPI1_suite.cpp b/src_cpp/MPI1/MPI1_suite.cpp index c978815..88b21fd 100644 --- a/src_cpp/MPI1/MPI1_suite.cpp +++ b/src_cpp/MPI1/MPI1_suite.cpp @@ -840,6 +840,10 @@ template <> void BenchmarkSuite::get_bench_list(vector &benchs, result.detach_ptr(); } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfree-nonheap-object" +#endif template<> any BenchmarkSuite::get_parameter(const std::string &key) { using namespace NS_MPI1; any result; @@ -848,6 +852,9 @@ template<> any BenchmarkSuite::get_parameter(const std::string &key) { HANDLE_PARAMETER(GLOBALS, glob); return result; } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif #ifdef WIN32 template BenchmarkSuite; diff --git a/src_cpp/helpers/helper_IMB_functions.h b/src_cpp/helpers/helper_IMB_functions.h index 8502423..0d05d81 100755 --- a/src_cpp/helpers/helper_IMB_functions.h +++ b/src_cpp/helpers/helper_IMB_functions.h @@ -378,7 +378,7 @@ struct Bmark_descr { { /* IMB 3.1 << */ - size_t s_len, r_len, s_alloc, r_alloc; + size_t s_len = 0, r_len = 0, s_alloc, r_alloc; int init_size, irep, i_s, i_r, x_sample; int asize = (int) sizeof(assign_type); diff --git a/src_cpp/helpers/original_benchmark.h b/src_cpp/helpers/original_benchmark.h index 59c373f..5ed2fda 100644 --- a/src_cpp/helpers/original_benchmark.h +++ b/src_cpp/helpers/original_benchmark.h @@ -134,7 +134,7 @@ class OriginalBenchmark : public Benchmark { int np = item.np; int imod = *(item.extra_fields.as()); double t; - MPI_Datatype base_s_dt, base_r_dt, base_red_dt; + MPI_Datatype base_s_dt = 0, base_r_dt = 0, base_red_dt = 0; if (!initialized) return; if (descr->stop_iterations) diff --git a/src_cpp/utils.h b/src_cpp/utils.h index 9e9a1eb..e72c73f 100644 --- a/src_cpp/utils.h +++ b/src_cpp/utils.h @@ -72,7 +72,7 @@ namespace set_operations { transform(list.begin(), list.end(), inserter(tmp, tmp.end()), to_lower); list = tmp; } - struct case_insens_cmp : public std::binary_function { + struct case_insens_cmp { bool operator()(const std::string &lhs, const std::string &rhs) const { #ifdef WIN_IMB return stricmp(lhs.c_str(), rhs.c_str()) < 0;