Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings on GCC 13 #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src_c/IMB_exchange.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion src_c/IMB_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src_cpp/MPI1/MPI1_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,10 @@ template <> void BenchmarkSuite<BS_MPI1>::get_bench_list(vector<string> &benchs,
result.detach_ptr(); }


#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
#endif
template<> any BenchmarkSuite<BS_MPI1>::get_parameter(const std::string &key) {
using namespace NS_MPI1;
any result;
Expand All @@ -848,6 +852,9 @@ template<> any BenchmarkSuite<BS_MPI1>::get_parameter(const std::string &key) {
HANDLE_PARAMETER(GLOBALS, glob);
return result;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

#ifdef WIN32
template BenchmarkSuite<BS_MPI1>;
Expand Down
2 changes: 1 addition & 1 deletion src_cpp/helpers/helper_IMB_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src_cpp/helpers/original_benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class OriginalBenchmark : public Benchmark {
int np = item.np;
int imod = *(item.extra_fields.as<int>());
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)
Expand Down
2 changes: 1 addition & 1 deletion src_cpp/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, std::string, bool> {
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;
Expand Down