Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
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 <tomhughes@chromium.org>
  • Loading branch information
thughes committed Jan 10, 2025
1 parent a1ef3c8 commit 671f6d3
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/net/shell/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,6 @@ static int tester_send(const struct device *dev, struct net_pkt *pkt)
return 0;
}

static inline struct in_addr *if_get_addr(struct net_if *iface)
{
int i;

for (i = 0; i < NET_IF_MAX_IPV4_ADDR; i++) {
if (iface->config.ip.ipv4->unicast[i].ipv4.is_used &&
iface->config.ip.ipv4->unicast[i].ipv4.address.family ==
AF_INET &&
iface->config.ip.ipv4->unicast[i].ipv4.addr_state ==
NET_ADDR_PREFERRED) {
return
&iface->config.ip.ipv4->unicast[i].ipv4.address.in_addr;
}
}

return NULL;
}

struct net_udp_context net_udp_context_data;

static struct dummy_api net_udp_if_api = {
Expand Down

0 comments on commit 671f6d3

Please sign in to comment.