Skip to content

Track and reduce maximal warning output in tests build #15

@jeanluct

Description

@jeanluct

Background

The test CMake build now supports a minimal default warning profile (-Wall) and an opt-in maximal profile (-DJLT_TESTS_MAX_WARNINGS=ON).

When maximal warnings are enabled, the build succeeds but produces a large warning surface in jlt headers/tests.

Goal

Incrementally reduce warning output under maximal warnings, and eventually make it practical to run with warnings-as-errors in CI for jlt-owned code.

Suggested approach

  • Capture and categorize warnings by type/source (e.g. -Wfloat-equal, sign-conversion, old-style-cast, unused parameter)
  • Prioritize warnings in jlt/ headers first, then tests
  • Keep third-party/vendor code (e.g. CSparse) out of this cleanup scope
  • Replace exact floating-point equality checks in tests with tolerant comparisons where appropriate
  • Add targeted suppressions only when warnings are intentional and documented
  • Add a CI job or optional workflow to exercise maximal warnings mode

Repro

From tests/build:

cmake .. -DJLT_TESTS_MAX_WARNINGS=ON
cmake --build .

(Optional strict mode):

cmake .. -DJLT_TESTS_MAX_WARNINGS=ON -DJLT_TESTS_WARNINGS_AS_ERRORS=ON

Notes

This issue is for tracking cleanup work over time; not intended as a one-shot refactor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions