[systemd-devel] [PATCH] sd-dhcp-client: shutup gcc aliasing warning
Shawn Landden
shawn at churchofgit.com
Sat Apr 11 18:39:47 PDT 2015
we only access this as void* so there is no violation
---
src/libsystemd-network/sd-dhcp-client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index c44392e..bf57d4b 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -1470,7 +1470,7 @@ static int client_receive_message_udp(sd_event_source *s, int fd,
_cleanup_free_ DHCPMessage *message = NULL;
int buflen = 0, len, r;
const struct ether_addr zero_mac = { { 0, 0, 0, 0, 0, 0 } };
- const struct ether_addr *expected_chaddr = NULL;
+ const void *expected_chaddr = NULL;
uint8_t expected_hlen = 0;
assert(s);
@@ -1515,7 +1515,7 @@ static int client_receive_message_udp(sd_event_source *s, int fd,
if (client->arp_type == ARPHRD_ETHER) {
expected_hlen = ETH_ALEN;
- expected_chaddr = (const struct ether_addr *) &client->mac_addr;
+ expected_chaddr = &client->mac_addr;
} else {
/* Non-ethernet links expect zero chaddr */
expected_hlen = 0;
--
2.2.1.209.g41e5f3a
More information about the systemd-devel
mailing list