COMP: Track the warning flags that are not yet clean (companion to #33) - #76
hjmjohnson wants to merge 1 commit into
Conversation
d57fd15 to
0a31a6b
Compare
0a31a6b to
8a83c06
Compare
|
Rebased onto current Rebase — one real conflict, resolved on the merits
The
Resolved by taking Census refreshed — the old counts were staleRe-measured at b4876bf, AppleClang 21.0.0, Release,
The three zeroed flags are now in a I also dropped the "needs PR #NN" column from the in-file table. Those numbers were going stale faster than the counts were, and a file in the repository is the wrong place to track a PR queue. Commit messageRewrapped to 78/72 and the census refresh recorded in the body. The No regression test — and why
Build and testmacOS/arm64, Ninja, Release, That build has |
922d25c to
0ea22ef
Compare
Enable the future-set flags alongside the clean set so CI measures them on every run and the counts stay honest as the fixing changes land. NIFTI_WARNINGS_AS_ERRORS stays OFF here by design. The future-set flags still warn, so making them errors would leave this branch permanently red and useless as a measurement. The build succeeds and the warnings appear in the log. The census was re-run against the current tree. -Wextra, its -Wsign-compare hits, -Wmissing-prototypes and -Wnewline-eof now measure zero and are staged as ready to promote rather than listed as future work. -Wextra-semi-stmt fell from 74 to 72; the rest are unchanged. The GCC-only and MSVC branches stay disabled: the GCC block has never been enabled anywhere so its counts are unknown, and no workflow builds on Windows. Co-Authored-By: Gabriel A. Devenyi <3001850+gdevenyi@users.noreply.github.com> (cherry picked from commit 0ea22ef)
0ea22ef to
2b85fca
Compare
Companion to #33. That PR carries the clean set — the warning flags the tree is already at zero under, which can merge now. This draft carries the future set: the flags that still produce warnings, enabled so CI measures them on every run.
This branch is green.
NIFTI_WARNINGS_AS_ERRORSstays OFF here by design, so the build succeeds and the warnings appear in the log rather than failing it. Verified locally:ninjaexit 0, 368 warnings.Keep as a draft. Flags graduate out of it one at a time, each only after the PR that fixes its warnings has landed, so CI is green at every step.
What is still dirty
Measured at
d773c59, AppleClang 21, Release,USE_CIFTI_CODE=ON USE_FSL_CODE=ON FSLSTYLE=ON,NIFTI_BUILD_TESTING=OFF.-Wsign-conversion-Wextra-semi-stmt-Wshorten-64-to-32-Wcast-align-Wmissing-prototypes-Wconditional-uninitialized-Wcast-qual-Wsign-compare(via-Wextra)-Wmissing-variable-declarations-Wnewline-eof-Wsign-conversionalone is 54% of the total. By directory:niftilib79,nifti258,fsliolib45,cifti14,znzlib4 — worth splitting so no single PR carries 200 mechanical casts through review.Promotion order
-Wnewline-eof(1),-Wmissing-variable-declarations(2).-Wsign-comparevia BUG: Fix signed/unsigned comparisons in the nifti tools #51 — unlocks-Wextra.-Wcast-qual(9) via BUG: Stop casting away const in fslio and cifti #45.-Wconditional-uninitialized(11) via BUG: Give i and j a defined value in nifti_mat44_to_orientation #47 / ENH: Zero-initialize the matrix locals clang cannot prove are filled #48.-Wmissing-prototypes(18) via COMP: Declare the exported functions that no header declares #37, after resolving its two symbols that wantstatic.-Wcast-align(19) via BUG: Use memcpy instead of casting to over-aligned pointer types #44.-Wshorten-64-to-32(31), then-Wextra-semi-stmt(74).-Wsign-conversion(200), split by directory.NIFTI_WARNINGS_AS_ERRORS=ONin CI, and COMP: Add CI jobs for clang-tidy and for building with -Werror #59's-Werrorjobs.Two branches left disabled for lack of CI
GCC-only block —
-Wcast-align=strict,-Wduplicated-branches,-Wduplicated-cond,-Wjump-misses-init,-Wlogical-op,-Wold-style-definition. GNU 13.3.0 runs in CI, but these have never been enabled anywhere, so their counts are unknown. They cannot be measured on an Apple workstation, where/usr/bin/gccis a clang shim. Measuring them from this branch'subuntu-latest, gcclog is the first task here.MSVC
/W3— no workflow has a Windows job, so that branch compiles nowhere. Enabling it would assert a cleanliness nobody can check.Caveats and housekeeping
NIFTI_BUILD_TESTING=OFFin the census, so test sources are uncounted. Re-run with testing on before calling any flag clean tree-wide.cmake/nifti_warnings.cmake, so they conflict by construction. Rebase this one ontomasteronce COMP: Add a shared compiler warning set #33 lands; the diff then reduces to the future-set block alone.master(d773c59).