Skip to content

Commit d679403

Browse files
thugheskartben
authored andcommitted
tests: net: arp: Remove unused function
Building with clang warns: tests/net/arp/src/main.c:152:31: error: unused function 'if_get_addr' [-Werror,-Wunused-function] static inline struct in_addr *if_get_addr(struct net_if *iface) ^ Signed-off-by: Tom Hughes <[email protected]>
1 parent 7179284 commit d679403

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tests/net/arp/src/main.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,6 @@ static int tester_send(const struct device *dev, struct net_pkt *pkt)
149149
return 0;
150150
}
151151

152-
static inline struct in_addr *if_get_addr(struct net_if *iface)
153-
{
154-
int i;
155-
156-
for (i = 0; i < NET_IF_MAX_IPV4_ADDR; i++) {
157-
if (iface->config.ip.ipv4->unicast[i].ipv4.is_used &&
158-
iface->config.ip.ipv4->unicast[i].ipv4.address.family ==
159-
AF_INET &&
160-
iface->config.ip.ipv4->unicast[i].ipv4.addr_state ==
161-
NET_ADDR_PREFERRED) {
162-
return
163-
&iface->config.ip.ipv4->unicast[i].ipv4.address.in_addr;
164-
}
165-
}
166-
167-
return NULL;
168-
}
169-
170152
static inline struct net_pkt *prepare_arp_reply(struct net_if *iface,
171153
struct net_pkt *req,
172154
struct net_eth_addr *addr,

0 commit comments

Comments
 (0)