Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix warnings in nanopb encoding code #2643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joelspadin
Copy link
Collaborator

The arg field on nanopb structs is a void* because it is shared between the encode and decode callbacks, even though the encode callback probably should not modify the data. We are passing const data using this non-const pointer, which causes warnings about discarding const. This commit explicitly casts to void* to suppress these warnings.

The "arg" field on nanopb structs is a void* because it is shared
between the encode and decode callbacks, even though the encode
callback probably should not modify the data. We are passing const data
using this non-const pointer, which causes warnings about discarding
const. This commit explicitly casts to void* to suppress these warnings.
@joelspadin joelspadin requested a review from a team as a code owner November 14, 2024 01:03
@joelspadin joelspadin added core Core functionality/behavior of ZMK studio ZMK Studio (runtime keymaps) labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionality/behavior of ZMK studio ZMK Studio (runtime keymaps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant