Clean up GNU compiler warnings#117
Merged
fluidnumerics-joe merged 5 commits intomainfrom Mar 10, 2026
Merged
Conversation
Fix all -Wc-binding-type, -Wunused-dummy-argument, -Wunused-variable, and -Wmaybe-uninitialized warnings reported by gfortran in the CI build: - SELF_GPU.f90, SELF_GPUBLAS.f90: use integer(c_int) instead of integer(kind(hipSuccess)) / integer(kind(HIPBLAS_STATUS_SUCCESS)) in BIND(C) function return types and value arguments to satisfy -Wc-binding-type - SELF_Model.f90, SELF_DGModel*_t.f90, SELF_Linear*_t.f90, SELF_Mapped*_t.f90, scalar/vector/tensor _t.f90 files, gpu/*.f90: add `if (.false.)` references in stub/default implementations to suppress -Wunused-dummy-argument without affecting behavior - Remove unused local variable declarations (ivar, WORKSPACE, imat, E, r, i, j, iel, s2, diff, nhat, nmag, fx, fy, etc.) throughout src/, test/, and examples/ - Initialize allocatable string before first use to suppress false-positive -Wmaybe-uninitialized in SELF_Model.f90 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adapt CLAUDE.md from Codex to Claude Code conventions and add a new section (§9) documenting fprettify-based formatting requirements drawn from CONTRIBUTING.md, including manual commands and pre-commit setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Remove unused variables (fileId, WORKSPACE, s2, bcid) from test files and eliminate allocatable str in ReportEntropy_Model to fix -Wunused-variable and -Wmaybe-uninitialized warnings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
-Wc-binding-type: Replaceinteger(kind(hipSuccess))andinteger(kind(HIPBLAS_STATUS_SUCCESS))with explicitinteger(c_int)in all BIND(C) function interfaces inSELF_GPU.f90andSELF_GPUBLAS.f90-Wunused-dummy-argument: Addif (.false.)references in stub/default method implementations acrossSELF_Model.f90,SELF_DGModel*_t.f90,SELF_Linear*_t.f90,SELF_Mapped*_t.f90, scalar/vector/tensor_t.f90files, andgpu/*.f90— suppresses the warning without affecting behavior or requiring pure-procedure-incompatible I/O-Wunused-variable: Remove unused local variable declarations (ivar,WORKSPACE,imat,E,r,i,j,iel,s2,diff,nhat,nmag,fx,fy, etc.) throughoutsrc/,test/, andexamples/-Wmaybe-uninitialized: Initialize the allocatablestrvariable before first use inSELF_Model.f90to eliminate a false-positive flow-analysis warningTest plan
🤖 Generated with Claude Code