Skip to content

COMP: Add a shared compiler warning set - #95

Open
hjmjohnson wants to merge 1 commit into
masterfrom
comp/shared-warning-set
Open

hjmjohnson wants to merge 1 commit into
masterfrom
comp/shared-warning-set

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Re-submission of #33, reverted from master on 2026-09-24 so it can be
reviewed before merging. Content is unchanged from the original.

Base: master. Nothing has to land before it.

It is a prerequisite for #76, which edits the same file to track the flags
that are not yet clean.

Commits
  • COMP: Add a shared compiler warning set, clean flags only

See #84 for the ordering of all 49 re-submitted pull requests.

Add cmake/nifti_warnings.cmake with the warning flags the tree is
already at zero under, so that a warning means a new defect rather
than more noise.

Fourteen flags are enabled: thirteen common to GCC and Clang, plus
-Wcomma on Clang. Verified with NIFTI_WARNINGS_AS_ERRORS=ON in both
the default and the USE_CIFTI_CODE/USE_FSL_CODE/FSLSTYLE
configurations: zero compiler warnings.

The flags that are wanted but not yet earned are recorded in a
FUTURE SET comment block with their measured hit counts and the
census command that produces them. They are promoted one at a time,
each only after the change that fixes its warnings has landed, so CI
stays green at every step.

The GCC-only and MSVC branches are left empty: the GCC block has
never been enabled anywhere so its counts are unknown, and no
workflow builds on Windows at all.

Co-Authored-By: Gabriel A. Devenyi <3001850+gdevenyi@users.noreply.github.com>
(cherry picked from commit 596441b)
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