Skip to content

audiograph on CircuitPython: fix the -Werror=cast-align build break on ESP32 - #305

Merged
bdbarnett merged 1 commit into
mainfrom
fix/cp-cast-align
Oct 21, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/cp-cast-align

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

CircuitPython's ESP32 builds compile with -Werror=cast-align, and Graph.run's output pointer (a byte pointer cast to int16_t *) stopped the build at shared-bindings/audiograph/Graph.c:251. The offset is a whole number of int16 blocks into an int16 buffer, so it is aligned; the cast now goes through void * to say so. Behaviour is unchanged.

Checked by building CircuitPython for the Waveshare ESP32-S3-Touch-LCD-7 with this glue: the unfixed line fails with that error (and it is the only one across the glue, built with make -k); with the fix the build links. The audiograph tests, the CPython/MicroPython/CircuitPython render comparison at 0 counts and the planted-fault runs all pass.

… int16 pointer

CircuitPython's ESP32 builds compile with -Werror=cast-align, and the cast
from a byte pointer to int16_t * stopped the build. The offset is a whole
number of int16 blocks into an int16 buffer, so the pointer is aligned;
the cast now says so. Nothing else changes.
@bdbarnett
bdbarnett merged commit 6042745 into main Oct 21, 2026
31 checks passed
@bdbarnett
bdbarnett deleted the fix/cp-cast-align branch October 21, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant