Skip to content

Use intptr_t instead of int64_t for void* state casts - #571

Merged
bwhitman merged 1 commit into
mainfrom
fix/intptr-cast-warnings
Mar 2, 2026
Merged

Use intptr_t instead of int64_t for void* state casts#571
bwhitman merged 1 commit into
mainfrom
fix/intptr-cast-warnings

Conversation

@bwhitman

@bwhitman bwhitman commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace int64_t with intptr_t in 5 casts between void* and integer in patches.c
  • Fixes -Wpointer-to-int-cast warnings on 32-bit ESP32 targets where int64_t (8 bytes) != void* (4 bytes)
  • intptr_t is guaranteed to match pointer width on all platforms

Test plan

  • make test passes (72 tests)
  • tulipcc amyboard ESP build has no pointer cast warnings

🤖 Generated with Claude Code

The yield_synth_events and yield_synth_commands functions use void* as
an opaque integer state. On 32-bit targets (ESP32), casting between
void* and int64_t triggers -Wpointer-to-int-cast warnings since the
sizes differ. intptr_t is guaranteed to match pointer width on all
platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant