Skip to content

build(esp32): scope -Wno-error= overrides (array-bounds, maybe-uninitialized, uninitialized, deprecated-declarations) to vendor sources only #403

Description

@zackees

Summary

fbuild's default ESP32 compile-flag set silently downgrades four bug-class errors to warnings workspace-wide, including for FastLED and user sketch sources — not just for ESP-IDF / framework headers:

  • -Wno-error=array-bounds
  • -Wno-error=maybe-uninitialized
  • -Wno-error=uninitialized
  • -Wno-error=deprecated-declarations

Why this is bad

These are exactly the warning classes that catch real bugs: out-of-bounds writes, use of uninitialized memory, deprecated SDK calls that will stop working in the next IDF release. Today they survive -Werror because of these blanket overrides; tomorrow a regression in user code or in FastLED itself will ship green with a latent corruption / UB / EOL-API bug.

Evidence

Surfaced by an audit of recent FastLED CI runs across the ESP32 matrix (esp32dev/s2/s3/wroom/c2/c3/c6/h2). No diagnostics fired on the audited runs, but the suppressions are armed and unscoped.

Proposed fix

Scope these -Wno-error= flags to ESP-IDF + framework-arduinoespressif32 include paths only (use the same scoping mechanism the CH32V third-party-warning policy uses — see PR #399). FastLED + sketch code should still error on these classes.

Acceptance: a regression test that compiles a tiny sketch with a deliberate -Warray-bounds violation fails the build on esp32dev / esp32s3 / esp32c3.

Cross-references

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions