You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build(nrf52): -Warray-bounds in Adafruit BSP nrf_clock.h — bump pin past patched NRFX or scope suppression #407
All 4 nRF52 board builds (adafruit_feather_nrf52840_sense, adafruit_xiaoblesense, nrf52840_dk, nrf52_xiaoblesense) emit a -Warray-bounds= from the Adafruit nRF52 BSP:
warning: array subscript ... partly outside array bounds of 'nrf_clock_hfclk_t[1]'
nordic/nrfx/hal/nrf_clock.h:800 (inlined into dcd_nrf5x.c:919 hfclk_running)
Root cause
Upstream NRFX HAL bug: (*(uint32_t *)clk_src) casts a nrf_clock_hfclk_t* (1-element array) to uint32_t* and reads past it. Triggers GCC's array-bounds analysis. This is a classic strict-aliasing violation.
Why this matters for fbuild
It's an upstream issue but fbuild controls the BSP pin via the nRF52 platform crate. To resolve it on our side we have two options:
Bump the Adafruit nRF52 BSP pin past the patched NRFX (verify which NRFX release fixes it).
Scope -Wno-array-bounds to the BSP nordic/nrfx/* paths only, keeping FastLED and sketch code held to -Warray-bounds.
Proposed fix
Investigate which Adafruit nRF52 BSP release patches NRFX. If a fixed release exists, bump the pin in the nRF52 packages config. If not, add a scoped suppression in the nRF52 orchestrator (precedent: CH32V third-party warning scoping in PR #399).
Cross-references
Upstream bug: file in Adafruit_nRF52_Arduino repo if not already reported.
Activity
zackees commentedon Jun 4, 2026
Tracked under fbuild meta-audit: #408
fix(nrf52): scope -Wno-array-bounds to Adafruit BSP vendor sources on…