Fix Clang compiler warnings in fflib and PETSc/SLEPc plugins#386
Merged
Fix Clang compiler warnings in fflib and PETSc/SLEPc plugins#386
Conversation
Copilot
AI
changed the title
[WIP] Fix warning for null passed to non-null argument
Fix -Wnonnull warning in Op2_padd by replacing nullptr with R()
Mar 25, 2026
5a2e55f to
e1ec93f
Compare
Copilot
AI
changed the title
Fix -Wnonnull warning in Op2_padd by replacing nullptr with R()
Fix Clang compiler warnings in fflib and PETSc/SLEPc plugins
Mar 25, 2026
prj-
approved these changes
Mar 25, 2026
Co-authored-by: prj- <[email protected]> Agent-Logs-Url: https://github.com/FreeFem/FreeFem-sources/sessions/b9e0b6e5-f1ac-4c81-9810-513c2c935731
e1ec93f to
e846e6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several Clang warnings were being emitted across
ffliband the MPI plugins. This PR addresses them with minimal, targeted fixes.Changes
src/fflib/Operator.hpp— Fix-Wnonnull:nullptrwas being used where a value of typeRis required inOp2_padd::f. Replaced withR()(zero-initialized default):src/fflib/AFunction.hpp— Fix implicitconst-pointer cast inmemcpy: add explicit(void*)cast to the destination argument.plugin/mpi/PETSc-code.hpp/plugin/mpi/SLEPc-code.hpp— Suppress-Wunused-valuewarnings emitted from within the PETSc/SLEPc headers using#pragma clang diagnostic push/pop. Also normalizes theslepc.hinclude to use angle brackets (<slepc.h>).✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.