Skip to content

COMP: Audit — disable all CTest warning suppressions to surface hidden warnings#461

Closed
hjmjohnson wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:audit/uncomment-ctest-warning-suppressions
Closed

COMP: Audit — disable all CTest warning suppressions to surface hidden warnings#461
hjmjohnson wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:audit/uncomment-ctest-warning-suppressions

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Diagnostic PR: temporarily comments out every CTEST_CUSTOM_WARNING_EXCEPTION / CTEST_CUSTOM_ERROR_EXCEPTION pattern in CMake/CTestCustom.cmake.in so CI surfaces the warnings each suppression was hiding. Not intended to merge as-is — the goal is to read the CDash output and then restore only the suppressions that are still warranted.

Follow-up to the suppression-audit note on #449 (CTestCustom.cmake.in — "we should review all the suppressions and re-evaluate whether they are needed").

What to look at in CI
  • CDash will likely show many warnings (third-party Modules/ThirdParty/..., vnl, OpenCV, Sphinx deprecations, etc.).
  • CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS is still 199, so CDash truncates the list at 199 — the count is a floor, not the true total.
  • The set() scaffolding and ${VAR} continuation lines are preserved, so the configured CTestCustom.cmake stays valid with an empty exception list.
Next steps
  1. Categorize surfaced warnings: (a) third-party / vendored code we don't control → keep suppression; (b) our own examples/docs → fix at source; (c) stale patterns matching nothing → delete.
  2. Restore suppressions in category (a), drop category (c), open fixes for category (b).

@github-actions github-actions Bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots labels Jun 13, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review June 13, 2026 11:50
@hjmjohnson hjmjohnson marked this pull request as draft June 13, 2026 11:50
Comment out every CTEST_CUSTOM_WARNING_EXCEPTION and
CTEST_CUSTOM_ERROR_EXCEPTION pattern so CI surfaces the warnings each
suppression was masking. This is a diagnostic pass to decide which
suppressions are still needed versus which hide real, fixable warnings.

The set() scaffolding is preserved so the configured CTestCustom.cmake
remains valid with an empty exception list. Suppressions will be
restored selectively after reviewing the CDash output.
@hjmjohnson

Copy link
Copy Markdown
Member Author

Diagnostic complete — closing. This PR intentionally disabled every CTestCustom.cmake.in suppression to surface what they were hiding; it was never meant to merge. The findings have been triaged into focused PRs.

What was discovered and where it was fixed
Surfaced by disabling suppressions Outcome
itk::LabelGeometryImageFilter deprecation in GeometricPropertiesOfRegion (the only genuine compiler warning in our examples) Fixed in #462 — migrated the example to LabelImageToShapeLabelMapFilter + LabelStatisticsImageFilter; its suppression removed
Broken sed -i "6559d" hack on Sphinx's cpp.py (edited an unrelated line; relied on removed distutils) and the Duplicate C++ declaration handling Replaced in #463 + #464 with suppress_warnings = ['duplicate_declaration.cpp']
breathe parser-skip notices on a few complex ITK signatures it cannot parse Targeted CTest exception added in #464
libpng sCAL (runtime), vnl, and other third-party warnings Confirmed legitimate; suppressions kept

The C++ example builds themselves were clean on clang and gcc — the surfaced items were a single deprecated-API usage plus doc-toolchain and third-party noise. No code from this branch is needed.

@hjmjohnson hjmjohnson closed this Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant