Skip to content

net: ethernet: fix implicit void pointer cast#108500

Open
gr8rithic wants to merge 1 commit intozephyrproject-rtos:mainfrom
gr8rithic:fix/net-ethernet-cpp-cast
Open

net: ethernet: fix implicit void pointer cast#108500
gr8rithic wants to merge 1 commit intozephyrproject-rtos:mainfrom
gr8rithic:fix/net-ethernet-cpp-cast

Conversation

@gr8rithic
Copy link
Copy Markdown
Contributor

The net_eth_get_hw_config() function assigns dev->api (const void*) to a const struct ethernet_api* without an explicit cast. This commit fixes it.

The net_eth_get_hw_config() function assigns dev->api (const void*)
to a const struct ethernet_api* without an explicit cast. This is
valid in C but triggers -fpermissive warnings when the header is
included from C++ translation units.

Add an explicit cast to silence the warning.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Ethernet area: Networking size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants