Skip to content

build(renesas): scope -Wno-error= overrides on uno_r4_wifi (return-mismatch, implicit-function-declaration, int-conversion, incompatible-pointer-types) to FSP only #404

Description

@zackees

Summary

fbuild's Renesas RA4M1 (uno_r4_wifi) compile-flag set downgrades four critical-bug-class errors to warnings workspace-wide:

  • -Wno-error=return-mismatch
  • -Wno-error=implicit-function-declaration
  • -Wno-error=int-conversion
  • -Wno-error=incompatible-pointer-types

Why this is bad

These four are not stylistic — they catch:

  • return-mismatch — function declared to return X but returns Y, or no return at all → UB.
  • implicit-function-declaration — calling an undeclared function, GCC infers int(...) → wrong calling convention / ABI mismatch.
  • int-conversion — implicit narrowing/sign-conversion between integers and pointers → pointer corruption.
  • incompatible-pointer-types — pointer type punning that breaks strict-aliasing → mis-optimization.

Any FastLED or user sketch that introduces one of these will ship silently because fbuild swallows the error.

Evidence

Found by audit of uno_r4_wifi.txt lines 2543-2546 and 3286-3289 (both C and C++ flag blocks). Logged from a recent successful FastLED CI run.

Proposed fix

Scope the -Wno-error= overrides to the Renesas FSP vendor source paths only (per-file or per-archive in the platform JSON / orchestrator), keeping FastLED + sketch code held to the stricter standard. Same scoping approach as fbuild#382 / PR #399 used for CH32V -w on OpenWCH core sources.

Acceptance: a deliberate int *p = 42; in a user sketch fails the uno_r4_wifi build; the same statement inside fsp/ succeeds with a warning.

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