Skip to content

Commit

Permalink
Update tests/cpp/plot_dashboard_stress/main.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Reich <[email protected]>
  • Loading branch information
teh-cmc and Wumpf authored Nov 15, 2024
1 parent 63d5c59 commit 73bf6b2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/cpp/plot_dashboard_stress/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,12 @@ int main(int argc, char** argv) {

std::vector<size_t> 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);
Expand Down

0 comments on commit 73bf6b2

Please sign in to comment.