Skip to content

Conversation

sbstndb
Copy link
Contributor

@sbstndb sbstndb commented Oct 6, 2025

Description

  • Fix -Wmaybe-uninitialized by value-initializing iterator coord buffers in LevelCellArray.
  • Wrap OpenMP pragmas with SAMURAI_WITH_OPENMP guards to silence warnings when OpenMP is off.
  • Minor lambda parameter renames to avoid -Wshadow/-Wunused-parameter.

Related issue

Warnings when compiling with GCC

How has this been tested?

Compiled demos --> no more warnings when compiling advection-2d and burgers

Code of Conduct

By submitting this PR, you agree to follow our Code of Conduct

  • I agree to follow this project's Code of Conduct

Initialize coord_type index{} in begin/end/cbegin/cend to avoid GCC
-Wmaybe-uninitialized with xt::xtensor_fixed (xtensor 0.24).

Fixes warnings like:
  xfixed.hpp:334:9: warning: may be used uninitialized [-Wmaybe-uninitialized]
triggered via LevelCellArray::cbegin() constructing const_iterator.
@gouarin
Copy link
Contributor

gouarin commented Oct 19, 2025

Thanks ! It looks like there are still some warnings if you look at the GCC trace built in the CI. Could you also fix these ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants