]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Compiler warnings (a few were bugfixes internal to HEAD development) silenced.
authorDavid Hankins <dhankins@isc.org>
Mon, 5 Jun 2006 16:42:59 +0000 (16:42 +0000)
committerDavid Hankins <dhankins@isc.org>
Mon, 5 Jun 2006 16:42:59 +0000 (16:42 +0000)
[ISC-Bugs #16133]

common/parse.c
includes/dhcpd.h
includes/omapip/hash.h
omapip/hash.c

index 6b0115af049cc59ce217e1dd842af8010a70e21b..33529a5b1bdb94fc15f45dcc6396f15bab94806e 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: parse.c,v 1.110 2006/06/01 20:23:17 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: parse.c,v 1.111 2006/06/05 16:42:58 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1079,7 +1079,7 @@ void parse_option_space_decl (cfile)
                              default:
                                parse_warn(cfile, "invalid code width (%d), "
                                                  "expecting a 1, 2 or 4.",
-                                          val);
+                                          tsize);
                                goto bad;
                        }
                        break;
@@ -1100,7 +1100,7 @@ void parse_option_space_decl (cfile)
                        lsize = atoi(val);
                        if (lsize != 1 && lsize != 2) {
                                parse_warn(cfile, "invalid length width (%d) "
-                                                 "expecting 1 or 2.", val);
+                                                 "expecting 1 or 2.", lsize);
                                goto bad;
                        }
 
index a1c36a393f10f024aa0f89c61619776ea6863e80..bd6788591b56f77235d296ab431f129bf910383f 100644 (file)
@@ -2140,6 +2140,7 @@ void parse_client_lease_declaration PROTO ((struct parse *,
 int parse_option_decl PROTO ((struct option_cache **, struct parse *));
 void parse_string_list PROTO ((struct parse *, struct string_list **, int));
 int parse_ip_addr PROTO ((struct parse *, struct iaddr *));
+int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
 void parse_reject_statement PROTO ((struct parse *, struct client_config *));
 
 /* dhcrelay.c */
index 5bda95fab7eb1cde98f82aab560fef0891c8a2a8..15f2398fa157de22dcff7a1516ede864fe44c8ea 100644 (file)
@@ -60,7 +60,7 @@ struct hash_bucket {
        hashed_object_t *value;
 };
 
-typedef int (*hash_comparator_t)(const void *, const void *, unsigned long);
+typedef int (*hash_comparator_t)(const void *, const void *, size_t);
 
 struct hash_table {
        unsigned hash_count;
@@ -152,6 +152,6 @@ void delete_hash_entry (struct hash_table *, const void *,
 int hash_lookup (hashed_object_t **, struct hash_table *,
                        const void *, unsigned, const char *, int);
 int hash_foreach (struct hash_table *, hash_foreach_func);
-int casecmp (const void *s, const void *t, unsigned long len);
+int casecmp (const void *s, const void *t, size_t len);
 
 #endif /* OMAPI_HASH_H */
index e44aa71173503ce7e67be78d959e58bd3ddcc231..4c74679cf43f6c8d8886d4e769f21b71b9f2da4d 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: hash.c,v 1.8 2006/06/01 20:23:17 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: hash.c,v 1.9 2006/06/05 16:42:59 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include <omapip/omapip_p.h>
@@ -52,6 +52,7 @@ find_length(const void *key,
                return 4;
 
        log_fatal("Impossible condition at %s:%d.", MDL);
+       return 0; /* Silence compiler warnings. */
 }
 
 int new_hash_table (tp, count, file, line)
@@ -424,25 +425,25 @@ int hash_foreach (struct hash_table *table, hash_foreach_func func)
        return count;
 }
 
-int casecmp (const void *v1, const void *v2, unsigned long len)
+int casecmp (const void *v1, const void *v2, size_t len)
 {
-       unsigned i;
+       size_t i;
        const char *s = v1;
        const char *t = v2;
        
        for (i = 0; i < len; i++)
        {
                int c1, c2;
-               if (isascii (s [i]) && isupper (s [i]))
-                       c1 = tolower (s [i]);
+               if (isascii(s[i]))
+                       c1 = tolower(s[i]);
                else
-                       c1 = s [i];
-               
-               if (isascii (t [i]) && isupper (t [i]))
-                       c2 = tolower (t [i]);
+                       c1 = s[i];
+
+               if (isascii(t[i]))
+                       c2 = tolower(t[i]);
                else
-                       c2 = t [i];
-               
+                       c2 = t[i];
+
                if (c1 < c2)
                        return -1;
                if (c1 > c2)