Skip to content

drivers: wifi: eswifi: fix casts for 64 bit pointers #80243

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

Merged

Conversation

danieldegrasse
Copy link
Collaborator

@danieldegrasse danieldegrasse commented Oct 22, 2024

The eswifi driver uses an integer to identify the socket used for each connection, which must be cast to and from a void *. This causes warnings on 64 bit platforms, as precision is lost when casting from a void * to int. Use a uintptr_t type to store the socket value to resolve this warning. Also, fix a function signature for the accept_cb to use size_t instead of int for the length

Fixes #80242

The eswifi driver uses an integer to identify the socket used for each
connection, which must be cast to and from a `void *`. This causes
warnings on 64 bit platforms, as precision is lost when casting from a
`void *` to `int`. Use a `intptr_t` type to store the socket value to
resolve this warning. Also, fix a function signature for the `accept_cb`
to use `size_t` instead of `int` for the length

Fixes zephyrproject-rtos#80242

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
@danieldegrasse danieldegrasse force-pushed the fix/eswifi-sock-pointers branch from ebd59ae to 8d59874 Compare October 22, 2024 19:03
@mmahadevan108 mmahadevan108 merged commit 3d4f83a into zephyrproject-rtos:main Oct 24, 2024
25 checks passed
@mmahadevan108 mmahadevan108 deleted the fix/eswifi-sock-pointers branch October 24, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/drivers/build_all/wifi fails on native_sim/native/64
5 participants