From: Steven Barth Date: Tue, 18 Mar 2014 13:39:22 +0000 (+0100) Subject: Fix building with clang 3.4 X-Git-Tag: debian/1.1+git20160131-1~76 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=aa894a5a8f31056582cd990982df1322a36a0f2b;p=odhcp6c.git Fix building with clang 3.4 --- diff --git a/src/dhcpv6.c b/src/dhcpv6.c index bf62b29..c87d289 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -248,7 +248,7 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) void *srv_id = odhcp6c_get_state(STATE_SERVER_ID, &srv_id_len); // Build IA_PDs - size_t ia_pd_entries, ia_pd_len = 0; + size_t ia_pd_entries = 0, ia_pd_len = 0; uint8_t *ia_pd; if (type == DHCPV6_MSG_SOLICIT) { diff --git a/src/script.c b/src/script.c index 92bc464..61bab67 100644 --- a/src/script.c +++ b/src/script.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -175,7 +176,7 @@ static void entry_to_env(const char *name, const void *data, size_t len, enum en inet_ntop(AF_INET6, &e[i].target, &buf[buf_len], INET6_ADDRSTRLEN); buf_len += strlen(&buf[buf_len]); if (type != ENTRY_HOST) { - buf_len += snprintf(&buf[buf_len], 6, "/%hhu", e[i].length); + buf_len += snprintf(&buf[buf_len], 6, "/%"PRIu16, e[i].length); if (type == ENTRY_ROUTE) { buf[buf_len++] = ','; if (!IN6_IS_ADDR_UNSPECIFIED(&e[i].router)) {