Skip to content

Commit 2a1cef8

Browse files
thugheskartben
authored andcommitted
tests: net: udp: Remove unused function
Building with clang warns: tests/net/udp/src/main.c:112: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 d679403 commit 2a1cef8

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tests/net/udp/src/main.c

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

112-
static inline struct in_addr *if_get_addr(struct net_if *iface)
113-
{
114-
int i;
115-
116-
for (i = 0; i < NET_IF_MAX_IPV4_ADDR; i++) {
117-
if (iface->config.ip.ipv4->unicast[i].ipv4.is_used &&
118-
iface->config.ip.ipv4->unicast[i].ipv4.address.family ==
119-
AF_INET &&
120-
iface->config.ip.ipv4->unicast[i].ipv4.addr_state ==
121-
NET_ADDR_PREFERRED) {
122-
return
123-
&iface->config.ip.ipv4->unicast[i].ipv4.address.in_addr;
124-
}
125-
}
126-
127-
return NULL;
128-
}
129-
130112
struct net_udp_context net_udp_context_data;
131113

132114
static struct dummy_api net_udp_if_api = {

0 commit comments

Comments
 (0)