Skip to content

Commit 7179284

Browse files
thugheskartben
authored andcommitted
test: net: shell Remove unused function
Building with clang warns: tests/net/shell/src/main.c:110: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 d2bf3ae commit 7179284

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tests/net/shell/src/main.c

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

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

130112
static struct dummy_api net_udp_if_api = {

0 commit comments

Comments
 (0)