]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a few compile warnings.
authorRoy Marples <roy@marples.name>
Wed, 16 Apr 2008 09:55:35 +0000 (09:55 +0000)
committerRoy Marples <roy@marples.name>
Wed, 16 Apr 2008 09:55:35 +0000 (09:55 +0000)
client.c
dhcp.c

index 66386185b75f37ff8d41c64f1eaf03b8b64e3146..ae28023023b9523599fd968e722af6ea0ebde81e 100644 (file)
--- 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 25ecb55f06fec0f45e85652dee2eafebc48b1e38..da917a419f859b142eb430e073b9229eda439108 100644 (file)
--- 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;