Skip to content

Commit 3f138cc

Browse files
danttijfischer-no
authored andcommitted
[nrf fromtree] net: ethernet: Fix build without -fpermissive
Fix ethernet_hw_caps initialization in ethernet.h for strict type checking. g++-12: include/zephyr/net/ethernet.h:957:38: error: invalid \ conversion from 'int' to 'ethernet_hw_caps' [-fpermissive] Signed-off-by: Daniel Nicoletti <[email protected]> (cherry picked from commit b4f940d)
1 parent 0a2fb61 commit 3f138cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/net/ethernet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ enum ethernet_hw_caps net_eth_get_hw_capabilities(struct net_if *iface)
954954
{
955955
const struct device *dev = net_if_get_device(iface);
956956
const struct ethernet_api *api = (struct ethernet_api *)dev->api;
957-
enum ethernet_hw_caps caps = 0;
957+
enum ethernet_hw_caps caps = (enum ethernet_hw_caps)0;
958958
#if defined(CONFIG_NET_DSA) && !defined(CONFIG_NET_DSA_DEPRECATED)
959959
struct ethernet_context *eth_ctx = net_if_l2_data(iface);
960960

0 commit comments

Comments
 (0)