Skip to content

build: remove warnings when gcc is used#416

Open
gouarin wants to merge 16 commits intohpc-maths:mainfrom
gouarin:remove_warnings
Open

build: remove warnings when gcc is used#416
gouarin wants to merge 16 commits intohpc-maths:mainfrom
gouarin:remove_warnings

Conversation

@gouarin
Copy link
Contributor

@gouarin gouarin commented Feb 1, 2026

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

@gouarin gouarin force-pushed the remove_warnings branch 2 times, most recently from cf6506a to 028a8d8 Compare February 1, 2026 16:22
gouarin and others added 15 commits February 3, 2026 06:26
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 gouarin force-pushed the remove_warnings branch 3 times, most recently from 1561834 to 801c5d5 Compare February 3, 2026 09:48
@gouarin gouarin changed the title build: remove warnings build: remove warnings when gcc is used Feb 3, 2026
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