Repository navigation
COMP: Track the warning flags that are not yet clean - #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
0ea22ef to
2b85fca
Compare
cce3156 to
da23237
Compare
9047293 to
8e6e2c8
Compare
ab05240 to
a4b9fe6
Compare
2b85fca to
2c25cc9
Compare
|
Rebuilt on What changed
Verified locally: ninja exit 0 with testing off and on, warning counts from the branch alone match the census, ctest 344/344. |
2c25cc9 to
d86c549
Compare
gdevenyi
left a comment
There was a problem hiding this comment.
Review by Google Carbon
Verdict: Request Changes (Keep as Draft measurement branch; rebase & update census)
Since this PR intentionally enables noisy future flags with NIFTI_WARNINGS_AS_ERRORS=OFF to measure warning counts across CI, it should remain unmerged as a draft tracking branch, with the following updates needed:
- Rebase onto current
master(50a9216): Basea2ff9a0predates#88(a79dd8a), so CI on this branch is currently not compilingcifti/,fsliolib/, or-DFSLSTYLE=ON(-DPIGZ,-DREJECT_COMPLEX)! - Guard
CMAKE_C_COMPILER_ID MATCHES ...blocks againstclang-cl(AND NOT MSVC): On Windows withclang-cl,CMAKE_C_COMPILER_IDis"Clang"whileMSVCisTRUE, and passing-Walltoclang-clmaps to MSVC/Wall= Clang-Weverything! Every GNU/Clang block incmake/nifti_warnings.cmake(both here and onmaster) should checkif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$" AND NOT MSVC). - Updated warning census on
origin/master(50a9216) (verified withclang-20,gcc-13, andgcc-14across all targets & tests withFSLSTYLE=OFF/ON):- Ready to promote to
master's clean set now (0warnings):-Wcast-qual,-Wnewline-eof, and 5 GCC-only flags that were previously unmeasured:-Wduplicated-branches,-Wduplicated-cond,-Wjump-misses-init,-Wlogical-op,-Wold-style-definition. -Wextrais already0on Clang 20 and GCC 13! (-Wsign-comparewas cleared inab70a3b; on GCC >= 14-Wextraonly trips 8–10-Wcalloc-transposed-argssites).- Note on
-Wmissing-declarations: Already inmaster's clean set because the initial census ran on AppleClang (where-Wmissing-declarationsis a no-op for C functions!), but it actually emits 14–18 warnings on GCC until PR#90lands.
- Ready to promote to
| # --------------------------------------------------------------------- | ||
| # Ready to promote: measured at zero, not yet in the clean set | ||
| # --------------------------------------------------------------------- | ||
| if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") |
There was a problem hiding this comment.
[Google Carbon] Guard all GNU|Clang|AppleClang / Clang|AppleClang conditions (here and on lines 37, 46, 55, 72, 81, 89) with AND NOT MSVC and anchor the regex (MATCHES "^(GNU|Clang|AppleClang)$" AND NOT MSVC). Under clang-cl on Windows, CMAKE_C_COMPILER_ID is "Clang" with MSVC=TRUE, where -Wall is interpreted as /Wall (-Weverything).
Also note that -Wcast-qual (here), -Wnewline-eof (line 74), and GCC's -Wduplicated-branches, -Wduplicated-cond, -Wjump-misses-init, -Wlogical-op, and -Wold-style-definition are all at 0 warnings on current master and ready for a standalone promotion PR.
There was a problem hiding this comment.
The blocks this branch adds are anchored and guarded with AND NOT MSVC in 51485b4, and the zero-count flags you listed (GCC-only five included) now sit in the ready block; -Wcast-qual went back to the future set because nifti_short_read_test.c now has one hit. The two clean-set blocks belong to master, so their guard needs its own change there; leaving this open until that is decided.
d86c549 to
51485b4
Compare
Enable the flags the tree does not yet pass 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. These 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. Flags that now measure zero on AppleClang and GCC sit in their own block, ready to move into the clean set. The added blocks skip clang-cl, which reports the Clang ID but reads GCC-style flags as MSVC ones. Co-Authored-By: Gabriel A. Devenyi <gdevenyi@gmail.com>
51485b4 to
4277649
Compare
|
Two force-pushes: Census at 81f36bf (AppleClang 21 and GCC 16, Release, testing ON, cifti, FSL, and FSLSTYLE ON)
Build exits 0 under both compilers; ctest 351/351 on AppleClang. |
Measurement branch: enables the warning flags the tree does not yet pass, so CI counts them on every run. The clean set it sits on top of is on
master(#33, #95). Keep as a draft; flags graduate out of it one at a time, each after the change fixing its warnings has landed.NIFTI_WARNINGS_AS_ERRORSstays OFF here by design: the build succeeds and the warnings appear in the log.Ready to promote now:
-Wcast-align,-Wextra-semi-stmt,-Wmissing-variable-declarations, and-Wnewline-eof(Clang), plus-Wduplicated-branches,-Wduplicated-cond,-Wjump-misses-init,-Wlogical-op, and-Wold-style-definition(GCC) measure zero onmasterand can move into the clean set in their own change.Census at 81f36bf
AppleClang 21 and GCC 16, Release,
NIFTI_BUILD_TESTING=ON USE_CIFTI_CODE=ON USE_FSL_CODE=ON FSLSTYLE=ON.-Wsign-conversion-Wshorten-64-to-32-Wmissing-prototypes-Wconditional-uninitialized-Wextra-Wcast-qual-Wextraon GCC 16 is all-Wcalloc-transposed-args.-Wcast-qualis one cast inniftilib/nifti_short_read_test.c.Promotion order
-Wcast-qual(1), then-Wextraonce thecallocargument order is fixed.-Wconditional-uninitialized(13),-Wmissing-prototypes(18).-Wshorten-64-to-32(31).-Wsign-conversion(198), split by directory.NIFTI_WARNINGS_AS_ERRORS=ONin CI.clang-cl and MSVC
The blocks this branch adds skip clang-cl (
AND NOT MSVC), which reports the Clang compiler ID but takes MSVC-style flags. The clean-set blocks onmasterstill lack that guard and need their own change. MSVC/W3has never been measured.