diff options
author | dzwdz | 2022-08-22 15:00:49 +0200 |
---|---|---|
committer | dzwdz | 2022-08-22 15:00:49 +0200 |
commit | 06beffa4f8f350aad6f6167abb7bebeecd0166ff (patch) | |
tree | 64f19be02466c8bb793e5d30a5c0e0554deffc22 /src/user/app | |
parent | b4fa8bbba8fc45806bbf318ffbda749ac65194df (diff) |
user/netstack: fix some meaningless type warnings
Diffstat (limited to 'src/user/app')
-rw-r--r-- | src/user/app/netstack/arp.c | 2 | ||||
-rw-r--r-- | src/user/app/netstack/ether.c | 4 | ||||
-rw-r--r-- | src/user/app/netstack/udp.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/user/app/netstack/arp.c b/src/user/app/netstack/arp.c index cfb1e04..9eab8e3 100644 --- a/src/user/app/netstack/arp.c +++ b/src/user/app/netstack/arp.c @@ -31,7 +31,7 @@ void arp_parse(const uint8_t *buf, size_t len) { uint32_t daddr = nget32(buf + DstIP); if (daddr == state.ip) { uint8_t *pkt = ether_start(30, (struct ethernet){ - .dst = buf + SrcMAC, + .dst = (void*)(buf + SrcMAC), .type = ET_ARP, }); nput16(pkt + HdrType, 1); diff --git a/src/user/app/netstack/ether.c b/src/user/app/netstack/ether.c index 5893632..20d16ab 100644 --- a/src/user/app/netstack/ether.c +++ b/src/user/app/netstack/ether.c @@ -12,8 +12,8 @@ struct ethq *ether_queue; void ether_parse(const uint8_t *buf, size_t len) { struct ethernet ether = (struct ethernet){ - .src = buf + SrcMAC, - .dst = buf + DstMAC, + .src = (void*)(buf + SrcMAC), + .dst = (void*)(buf + DstMAC), .type = nget16(buf + EtherType), }; diff --git a/src/user/app/netstack/udp.c b/src/user/app/netstack/udp.c index 8129a48..d53137d 100644 --- a/src/user/app/netstack/udp.c +++ b/src/user/app/netstack/udp.c @@ -54,7 +54,7 @@ void udpc_send(struct udp_conn *c, const void *buf, size_t len) { .proto = 0x11, .src = c->lip, .dst = c->rip, - .e.dst = c->rmac, + .e.dst = &c->rmac, }); free(pkt); } |