Skip to content

Commit f63855c

Browse files
committed
net: if: Mark not used args as unused
If the function parameter is not used, mark it as unused to avoid compiler warning. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 24b49f4 commit f63855c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/net/net_if.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ static inline struct net_offload *net_if_offload(struct net_if *iface)
627627
#if defined(CONFIG_NET_OFFLOAD)
628628
return iface->if_dev->offload;
629629
#else
630+
ARG_UNUSED(iface);
631+
630632
return NULL;
631633
#endif
632634
}

subsys/net/ip/net_if.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ void net_if_stats_reset(struct net_if *iface)
400400
return;
401401
}
402402
}
403+
#else
404+
ARG_UNUSED(iface);
403405
#endif
404406
}
405407

@@ -3801,6 +3803,9 @@ static bool need_calc_checksum(struct net_if *iface, enum ethernet_hw_caps caps)
38013803

38023804
return !(net_eth_get_hw_capabilities(iface) & caps);
38033805
#else
3806+
ARG_UNUSED(iface);
3807+
ARG_UNUSED(caps);
3808+
38043809
return true;
38053810
#endif
38063811
}
@@ -3960,6 +3965,8 @@ static int promisc_mode_set(struct net_if *iface, bool enable)
39603965
}
39613966
}
39623967
#else
3968+
ARG_UNUSED(enable);
3969+
39633970
return -ENOTSUP;
39643971
#endif
39653972

0 commit comments

Comments
 (0)