From: Roy Marples Date: Wed, 16 Apr 2008 09:55:35 +0000 (+0000) Subject: Fix a few compile warnings. X-Git-Tag: v4.0.2~485 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2798d7bd66eb85df4a8878eb3f9cc532e083ee61;p=thirdparty%2Fdhcpcd.git Fix a few compile warnings. --- diff --git a/client.c b/client.c index 66386185..ae280230 100644 --- a/client.c +++ b/client.c @@ -793,7 +793,7 @@ handle_timeout(struct if_state *state, const struct options *options) struct dhcp_lease *lease = &state->lease; struct interface *iface = state->interface; int gotlease = -1; - char *reason = NULL; + const char *reason = NULL; /* No NAK, so reset the backoff */ state->nakoff = 1; diff --git a/dhcp.c b/dhcp.c index 25ecb55f..da917a41 100644 --- a/dhcp.c +++ b/dhcp.c @@ -848,7 +848,7 @@ read_lease(const struct interface *iface) return dhcp; } -ssize_t +static ssize_t print_string(char *s, const uint8_t *data, ssize_t len) { uint8_t c; @@ -909,7 +909,6 @@ static ssize_t print_option(char *s, int type, const uint8_t *data, ssize_t len) { const uint8_t *e, *t; - uint8_t u8; uint16_t u16; int16_t s16; uint32_t u32; @@ -1005,11 +1004,8 @@ _setenv(const char *prefix, const char *var, const char *value) int configure_env(const char *prefix, const struct dhcp_message *dhcp) { - int i; - const uint8_t *p, *e, *t; - uint32_t u32; - uint16_t u16; - uint8_t u8; + unsigned int i; + const uint8_t *p; struct in_addr addr; struct in_addr net; struct in_addr brd;