diff --git a/tests/cpp/plot_dashboard_stress/main.cpp b/tests/cpp/plot_dashboard_stress/main.cpp index 16ef17211fe6..b7f8f7de1add 100644 --- a/tests/cpp/plot_dashboard_stress/main.cpp +++ b/tests/cpp/plot_dashboard_stress/main.cpp @@ -147,14 +147,12 @@ int main(int argc, char** argv) { std::vector offsets; if (temporal_batch_size.has_value()) { -// GCC wrongfully thinks that `temporal_batch_size` might be uninit, even though we've -// literally checked for that in the line above?! -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +// GCC wrongfully thinks that `temporal_batch_size` is uninitialized despite being initialized upon creation. +RR_DISABLE_MAYBE_UNINITIALIZED_PUSH for (size_t i = 0; i < num_points_per_series; i += *temporal_batch_size) { offsets.push_back(i); } -#pragma GCC diagnostic pop +RR_DISABLE_MAYBE_UNINITIALIZED_POP } else { offsets.resize(sim_times.size()); std::iota(offsets.begin(), offsets.end(), 0);