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

Maintenance: Add Maybe Unused Macro #491

Merged
merged 37 commits into from
May 30, 2024
Merged

Conversation

gardner48
Copy link
Member

Add SUNDIALS_MAYBE_UNUSED macro to suppresses warnings on unused entities.

Conflicts:
  src/arkode/arkode_adapt.c
  src/arkode/arkode_butcher.c
  src/sundials/sundials_hashmap.c
Conflicts:
  cmake/SundialsSetupCompilers.cmake
  examples/arkode/CXX_parallel/ark_heat2D_p.cpp
  examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp
  examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp
  examples/cvode/CXX_parallel/cv_heat2D_p.cpp
  examples/cvode/CXX_parhyp/cv_heat2D_hypre_ls.cpp
  examples/cvode/CXX_parhyp/cv_heat2D_hypre_pfmg.cpp
  src/nvector/manyvector/nvector_manyvector.c
@gardner48
Copy link
Member Author

Opening draft PR for testing

@gardner48 gardner48 marked this pull request as ready for review May 25, 2024 00:59
Copy link
Collaborator

@drreynolds drreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my impression that the "unused" warnings are originally intended to help developers clean up their code. It looks like those warnings have identified multiple locations where we could stand some cleanup. I'd prefer that this PR actually fix those items than plaster over them with the SUNDIALS_MAYBE_UNUSED macro.

src/arkode/arkode_ls.c Show resolved Hide resolved
src/arkode/arkode_relaxation.c Outdated Show resolved Hide resolved
src/cvodes/cvodes.c Show resolved Hide resolved
src/cvodes/cvodes_nls_stg1.c Show resolved Hide resolved
src/idas/idas.c Show resolved Hide resolved
src/nvector/parhyp/nvector_parhyp.c Show resolved Hide resolved
src/nvector/parhyp/nvector_parhyp.c Show resolved Hide resolved
src/nvector/petsc/nvector_petsc.c Show resolved Hide resolved
src/nvector/petsc/nvector_petsc.c Show resolved Hide resolved
src/sundials/sundials_profiler.c Outdated Show resolved Hide resolved
@gardner48
Copy link
Member Author

It's my impression that the "unused" warnings are originally intended to help developers clean up their code.

It's also helpful for catching errors like those in PRs #472 and #473 which I came across when adding this macro.

drreynolds
drreynolds previously approved these changes May 29, 2024
@balos1 balos1 added this to the SUNDIALS Next milestone May 30, 2024
@balos1 balos1 merged commit f7abeaf into develop May 30, 2024
23 checks passed
@balos1 balos1 deleted the feature/sundials-maybe-unused branch May 30, 2024 16:07
gardner48 added a commit that referenced this pull request Jun 20, 2024
Add `SUNDIALS_MAYBE_UNUSED` macro to suppresses warnings on unused
entities.
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.

3 participants