summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2006-06-05 16:42:59 +0000
committerDavid Hankins <dhankins@isc.org>2006-06-05 16:42:59 +0000
commitd19e2cf7de53b5652d81164ca4559789e3dea511 (patch)
tree684ccadb1b466f0de3a478da644b7ef70fa38454
parent41c3f761a36e78f6313af443c6803b05639745ca (diff)
downloadisc-dhcp-d19e2cf7de53b5652d81164ca4559789e3dea511.tar.gz
Compiler warnings (a few were bugfixes internal to HEAD development) silenced.
[ISC-Bugs #16133]
-rw-r--r--common/parse.c6
-rw-r--r--includes/dhcpd.h1
-rw-r--r--includes/omapip/hash.h4
-rw-r--r--omapip/hash.c23
4 files changed, 18 insertions, 16 deletions
diff --git a/common/parse.c b/common/parse.c
index 6b0115af..33529a5b 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -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;
}
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index a1c36a39..bd678859 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -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 */
diff --git a/includes/omapip/hash.h b/includes/omapip/hash.h
index 5bda95fa..15f2398f 100644
--- a/includes/omapip/hash.h
+++ b/includes/omapip/hash.h
@@ -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 */
diff --git a/omapip/hash.c b/omapip/hash.c
index e44aa711..4c74679c 100644
--- a/omapip/hash.c
+++ b/omapip/hash.c
@@ -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)