Skip to content

The GCC and clang port checks fail only on a failed compilation, so port warnings can accumulate unseen #682

Description

@fdesbiens

scripts/check_gcc.sh and scripts/check_clang.sh both fail only on a failed compilation. Neither passes -Werror, and check_gcc.sh's header deliberately does not claim warning cleanliness.

So a port can accumulate warnings indefinitely and both checks stay green.

Why it was left out of #675

Turning -Werror on without first running the warning set over all 49 port families would land a red check on day one, and nobody would know how deep the hole is. Establishing that baseline is a separate and larger piece of work than adding the flag.

There is evidence it would find real things: the kernel warning pass over common/ and common_smp/ found defects that built cleanly.

What this needs, in order

  1. Measure first. Run the existing stages with a candidate warning set and no -Werror, and count warnings per port family. That number decides whether this is a week or a quarter.
  2. Choose the set deliberately. -Wall -Wextra is the obvious start; the port assembly and the generated port trees will need thought, and ports_arch/ sources and their generated copies must not diverge.
  3. Then decide the shape. Options are a hard -Werror once clean, a per-family allowlist that shrinks over time, or reporting warnings as a count that must not increase. The third is the cheapest to land and the easiest to ignore.

Note on scope

This is about the cross-compiled port check. It is separate from any warning policy on the Linux regression build, which compiles a different set of files with a different compiler.

Follows from #675.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature or enhancement request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions