From: Roy Marples Date: Fri, 28 Feb 2014 10:38:29 +0000 (+0000) Subject: Fix some silly warnings. X-Git-Tag: v6.3.1~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=831c7446c0512d902a82f09d6b0fad80be3192ef;p=thirdparty%2Fdhcpcd.git Fix some silly warnings. --- diff --git a/dhcp.c b/dhcp.c index 18d82d1d..93bb9b2e 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1509,7 +1509,7 @@ send_message(struct interface *iface, int type, struct dhcp_state *state = D_STATE(iface); struct if_options *ifo = iface->options; struct dhcp_message *dhcp; - uint8_t *udp; + struct udp_dhcp_packet *udp; ssize_t len, r; struct in_addr from, to; in_addr_t a = 0; @@ -1573,7 +1573,8 @@ send_message(struct interface *iface, int type, if (udp == NULL) { syslog(LOG_ERR, "dhcp_makeudppacket: %m"); } else { - r = ipv4_sendrawpacket(iface, ETHERTYPE_IP, udp, r); + r = ipv4_sendrawpacket(iface, ETHERTYPE_IP, + (uint8_t *)udp, r); free(udp); } /* If we failed to send a raw packet this normally means diff --git a/dhcp6.c b/dhcp6.c index 56e9100d..1edf8d69 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -1503,7 +1503,8 @@ dhcp6_findia(struct interface *ifp, const uint8_t *d, size_t l, rebind = ntohl(u32); p += sizeof(u32); ol -= sizeof(u32); - } + } else + renew = rebind = 0; /* appease gcc */ if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1) continue; if (ifo->ia_type == D6_OPTION_IA_PD) {