Hi Jukka, > --- > gdhcp/common.c | 2 +- > gdhcp/server.c | 2 +- > plugins/loopback.c | 4 ++-- > src/config.c | 2 +- > src/dnsproxy.c | 4 ++-- > src/inet.c | 37 ++++++++++++++++++++++++------------- > src/iptables.c | 13 +++++++------ > src/ntp.c | 2 +- > src/rtnl.c | 17 +++++++++++++++++ > src/stats.c | 12 ++++++------ > tools/iptables-test.c | 13 +++++++------ > tools/stats-tool.c | 12 ++++++------ > 12 files changed, 75 insertions(+), 45 deletions(-) > > diff --git a/gdhcp/common.c b/gdhcp/common.c > index ae062f3..aaf73b8 100644 > --- a/gdhcp/common.c > +++ b/gdhcp/common.c > @@ -474,7 +474,7 @@ int dhcpv6_send_packet(int index, struct dhcpv6_packet > *dhcp_pkt, int len) > cmsg->cmsg_type = IPV6_PKTINFO; > cmsg->cmsg_len = CMSG_LEN(sizeof(*pktinfo)); > > - pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsg); > + pktinfo = (struct in6_pktinfo *)(void *)CMSG_DATA(cmsg);
this might be potentially correct. We should copy the CMSG_DATA into our own struct. Some gcc even complain about this for some of the data fields like timestamps etc. Or is the kernel ensuring that this is properly aligned? > memset(pktinfo, 0, sizeof(*pktinfo)); > pktinfo->ipi6_ifindex = index; > m.msg_controllen = cmsg->cmsg_len; > diff --git a/gdhcp/server.c b/gdhcp/server.c > index 6dec651..cdddb64 100644 > --- a/gdhcp/server.c > +++ b/gdhcp/server.c > @@ -338,7 +338,7 @@ static uint32_t get_interface_address(int index) > goto done; > } > > - server_ip = (struct sockaddr_in *) &ifr.ifr_addr; > + server_ip = (struct sockaddr_in *)(void *) &ifr.ifr_addr; > ret = server_ip->sin_addr.s_addr; These are ones I find ugly as hell. We should not need this at all. I really do not know if we should fix this or complain to clang or disable the warning. Regards Marcel _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
