Blob Blame Raw
diff -up dhcp-3.1.0/relay/dhcrelay.c.warnings dhcp-3.1.0/relay/dhcrelay.c
--- dhcp-3.1.0/relay/dhcrelay.c.warnings	2007-02-14 17:41:23.000000000 -0500
+++ dhcp-3.1.0/relay/dhcrelay.c	2007-10-23 14:33:17.000000000 -0400
@@ -739,7 +739,7 @@ int add_relay_agent_options (ip, packet,
 	unsigned length;
 	struct in_addr giaddr;
 {
-	int is_dhcp = 0, agent_options_present = 0;
+	int is_dhcp = 0;
 	unsigned optlen;
 	u_int8_t *op, *nextop, *sp, *max, *end_pad = NULL;
 
diff -up dhcp-3.1.0/dhcpctl/dhcpctl.c.warnings dhcp-3.1.0/dhcpctl/dhcpctl.c
--- dhcp-3.1.0/dhcpctl/dhcpctl.c.warnings	2005-03-17 15:15:03.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/dhcpctl.c	2007-10-23 14:33:17.000000000 -0400
@@ -101,7 +101,6 @@ dhcpctl_status dhcpctl_connect (dhcpctl_
 				dhcpctl_handle authinfo)
 {
 	isc_result_t status;
-	dhcpctl_status waitstatus;
 
 	status = omapi_generic_new (connection, MDL);
 	if (status != ISC_R_SUCCESS) {
@@ -171,7 +170,6 @@ dhcpctl_status dhcpctl_get_value (dhcpct
 {
 	isc_result_t status;
 	omapi_value_t *tv = (omapi_value_t *)0;
-	omapi_data_string_t *value = (omapi_data_string_t *)0;
 	unsigned len;
 	int ip;
 
@@ -263,7 +261,6 @@ dhcpctl_status dhcpctl_set_value (dhcpct
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *name = (omapi_data_string_t *)0;
-	int len;
 
 	status = omapi_data_string_new (&name, strlen (value_name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -297,7 +294,6 @@ dhcpctl_status dhcpctl_set_string_value 
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *name = (omapi_data_string_t *)0;
-	int len;
 
 	status = omapi_data_string_new (&name, strlen (value_name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -386,7 +382,6 @@ dhcpctl_status dhcpctl_set_boolean_value
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *name = (omapi_data_string_t *)0;
-	int len;
 
 	status = omapi_data_string_new (&name, strlen (value_name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -416,7 +411,6 @@ dhcpctl_status dhcpctl_set_int_value (dh
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *name = (omapi_data_string_t *)0;
-	int len;
 
 	status = omapi_data_string_new (&name, strlen (value_name), MDL);
 	if (status != ISC_R_SUCCESS)
diff -up dhcp-3.1.0/dhcpctl/cltest.c.warnings dhcp-3.1.0/dhcpctl/cltest.c
--- dhcp-3.1.0/dhcpctl/cltest.c.warnings	2005-03-17 15:15:03.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/cltest.c	2007-10-23 14:33:17.000000000 -0400
@@ -60,9 +60,8 @@ int main (argc, argv)
 	isc_result_t status, waitstatus;
 	dhcpctl_handle authenticator;
 	dhcpctl_handle connection;
-	dhcpctl_handle host_handle, group_handle, interface_handle;
-	dhcpctl_data_string cid;
-	dhcpctl_data_string result, groupname, identifier;
+	dhcpctl_handle interface_handle;
+	dhcpctl_data_string result;
 	int i;
 	int mode = undefined;
 	const char *interface = 0;
diff -up dhcp-3.1.0/dhcpctl/remote.c.warnings dhcp-3.1.0/dhcpctl/remote.c
--- dhcp-3.1.0/dhcpctl/remote.c.warnings	2005-03-17 15:15:04.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/remote.c	2007-10-23 14:33:17.000000000 -0400
@@ -354,8 +354,6 @@ isc_result_t dhcpctl_remote_stuff_values
 					  omapi_object_t *id,
 					  omapi_object_t *p)
 {
-	int i;
-
 	if (p -> type != dhcpctl_remote_type)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/dhcpctl/callback.c.warnings dhcp-3.1.0/dhcpctl/callback.c
--- dhcp-3.1.0/dhcpctl/callback.c.warnings	2005-03-17 15:15:02.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/callback.c	2007-10-23 14:33:17.000000000 -0400
@@ -59,7 +59,6 @@ dhcpctl_status dhcpctl_set_callback (dhc
 {
 	dhcpctl_callback_object_t *callback;
 	omapi_object_t *inner;
-	isc_result_t status;
 
 	callback = dmalloc (sizeof *callback, MDL);
 	if (!callback)
@@ -162,8 +161,6 @@ isc_result_t dhcpctl_callback_stuff_valu
 					    omapi_object_t *id,
 					    omapi_object_t *p)
 {
-	int i;
-
 	if (p -> type != dhcpctl_callback_type)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/dhcpctl/omshell.c.warnings dhcp-3.1.0/dhcpctl/omshell.c
--- dhcp-3.1.0/dhcpctl/omshell.c.warnings	2007-02-14 17:41:22.000000000 -0500
+++ dhcp-3.1.0/dhcpctl/omshell.c	2007-10-23 14:33:17.000000000 -0400
@@ -82,11 +82,9 @@ int main (int argc, char **argv, char **
 	dhcpctl_handle connection;
 	dhcpctl_handle authenticator;
 	dhcpctl_handle oh;
-	dhcpctl_data_string cid, ip_addr;
-	dhcpctl_data_string result, groupname, identifier;
 	struct data_string secret;
 	const char *name = 0, *algorithm = "hmac-md5";
-	int i, j;
+	int i;
 	int port = 7911;
 	const char *server = "127.0.0.1";
 	struct parse *cfile;
@@ -481,7 +479,6 @@ int main (int argc, char **argv, char **
 				val = buf;
 				do {
 				    int intval = atoi (val);
-				dotiszero:
 				    if (intval > 255) {
 					parse_warn (cfile,
 						    "dotted octet > 255: %s",
diff -up dhcp-3.1.0/omapip/message.c.warnings dhcp-3.1.0/omapip/message.c
--- dhcp-3.1.0/omapip/message.c.warnings	2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/message.c	2007-10-23 14:33:17.000000000 -0400
@@ -209,8 +209,6 @@ isc_result_t omapi_message_get_value (om
 isc_result_t omapi_message_destroy (omapi_object_t *h,
 				    const char *file, int line)
 {
-	int i;
-
 	omapi_message_object_t *m;
 	if (h -> type != omapi_type_message)
 		return ISC_R_INVALIDARG;
@@ -261,8 +259,6 @@ isc_result_t omapi_message_stuff_values 
 					 omapi_object_t *id,
 					 omapi_object_t *m)
 {
-	int i;
-
 	if (m -> type != omapi_type_message)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/omapip/alloc.c.warnings dhcp-3.1.0/omapip/alloc.c
--- dhcp-3.1.0/omapip/alloc.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/omapip/alloc.c	2007-10-23 14:33:17.000000000 -0400
@@ -93,7 +93,6 @@ VOIDPTR dmalloc (size, file, line)
 {
 	unsigned char *foo;
 	unsigned len;
-	int i;
 	VOIDPTR *bar;
 #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
 		defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
diff -up dhcp-3.1.0/omapip/connection.c.warnings dhcp-3.1.0/omapip/connection.c
--- dhcp-3.1.0/omapip/connection.c.warnings	2005-03-17 15:15:21.000000000 -0500
+++ dhcp-3.1.0/omapip/connection.c	2007-10-23 14:33:17.000000000 -0400
@@ -111,10 +111,6 @@ isc_result_t omapi_connect_list (omapi_o
 	omapi_connection_object_t *obj;
 	int flag;
 	struct sockaddr_in local_sin;
-#if defined (TRACING)
-	trace_addr_t *addrs;
-	u_int16_t naddrs;
-#endif
 
 	obj = (omapi_connection_object_t *)0;
 	status = omapi_connection_allocate (&obj, MDL);
@@ -1005,8 +1001,6 @@ isc_result_t omapi_connection_stuff_valu
 					    omapi_object_t *id,
 					    omapi_object_t *m)
 {
-	int i;
-
 	if (m -> type != omapi_type_connection)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/omapip/protocol.c.warnings dhcp-3.1.0/omapip/protocol.c
--- dhcp-3.1.0/omapip/protocol.c.warnings	2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/omapip/protocol.c	2007-10-23 14:33:17.000000000 -0400
@@ -165,7 +165,6 @@ isc_result_t omapi_protocol_send_message
 	omapi_remote_auth_t *ra;
 	omapi_value_t *signature;
 	isc_result_t status;
-	u_int32_t foo;
 	unsigned auth_len;
 
 	if (po -> type != omapi_type_protocol ||
@@ -944,8 +943,6 @@ isc_result_t omapi_protocol_stuff_values
 					  omapi_object_t *id,
 					  omapi_object_t *p)
 {
-	int i;
-
 	if (p -> type != omapi_type_protocol)
 		return ISC_R_INVALIDARG;
 
@@ -1132,8 +1129,6 @@ isc_result_t omapi_protocol_listener_stu
 					    omapi_object_t *id,
 					    omapi_object_t *p)
 {
-	int i;
-
 	if (p -> type != omapi_type_protocol_listener)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/omapip/listener.c.warnings dhcp-3.1.0/omapip/listener.c
--- dhcp-3.1.0/omapip/listener.c.warnings	2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/listener.c	2007-10-23 14:33:17.000000000 -0400
@@ -68,12 +68,9 @@ isc_result_t omapi_listen_addr (omapi_ob
 				omapi_addr_t *addr,
 				int max)
 {
-	struct hostent *he;
-	int hix;
 	isc_result_t status;
 	omapi_listener_object_t *obj;
 	int i;
-	struct in_addr ia;
 
 	/* Get the handle. */
 	obj = (omapi_listener_object_t *)0;
@@ -200,8 +197,6 @@ isc_result_t omapi_accept (omapi_object_
 	SOCKLEN_T len;
 	omapi_connection_object_t *obj;
 	omapi_listener_object_t *listener;
-	omapi_addr_t remote_addr;
-	int i;
 	struct sockaddr_in addr;
 	int socket;
 
@@ -223,7 +218,6 @@ isc_result_t omapi_accept (omapi_object_
 	/* If we're recording a trace, remember the connection. */
 	if (trace_record ()) {
 		trace_iov_t iov [3];
-		u_int32_t lsock;
 		iov [0].buf = (char *)&addr.sin_port;
 		iov [0].len = sizeof addr.sin_port;
 		iov [1].buf = (char *)&addr.sin_addr;
@@ -455,8 +449,6 @@ isc_result_t omapi_listener_stuff_values
 					  omapi_object_t *id,
 					  omapi_object_t *l)
 {
-	int i;
-
 	if (l -> type != omapi_type_listener)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/omapip/handle.c.warnings dhcp-3.1.0/omapip/handle.c
--- dhcp-3.1.0/omapip/handle.c.warnings	2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/handle.c	2007-10-23 14:33:17.000000000 -0400
@@ -76,7 +76,6 @@ static isc_result_t omapi_handle_table_e
 
 isc_result_t omapi_object_handle (omapi_handle_t *h, omapi_object_t *o)
 {
-	int tabix;
 	isc_result_t status;
 
 	if (o -> handle) {
@@ -285,7 +284,6 @@ static isc_result_t omapi_handle_lookup_
 isc_result_t omapi_handle_td_lookup (omapi_object_t **obj,
 				     omapi_typed_data_t *handle)
 {
-	isc_result_t status;
 	omapi_handle_t h;
 
 	if (handle -> type == omapi_datatype_int)
diff -up dhcp-3.1.0/omapip/trace.c.warnings dhcp-3.1.0/omapip/trace.c
--- dhcp-3.1.0/omapip/trace.c.warnings	2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/omapip/trace.c	2007-10-23 14:33:17.000000000 -0400
@@ -319,7 +319,7 @@ trace_type_t *trace_type_register (const
 				   void (*stop_tracing) (trace_type_t *),
 				   const char *file, int line)
 {
-	trace_type_t *ttmp, *tptr;
+	trace_type_t *ttmp;
 	unsigned slen = strlen (name);
 	isc_result_t status;
 
@@ -518,7 +518,6 @@ isc_result_t trace_get_next_packet (trac
 	trace_type_t *ttype;
 	unsigned paylen;
 	int status;
-	int len;
 	fpos_t curpos;
 
 	status = fgetpos (traceinfile, &curpos);
@@ -644,7 +643,6 @@ time_t trace_snoop_time (trace_type_t **
 	unsigned bufmax = 0;
 	unsigned buflen = 0;
 	char *buf = (char *)0;
-	isc_result_t status;
 	time_t result;
 	trace_type_t *ttp;
 	
diff -up dhcp-3.1.0/omapip/buffer.c.warnings dhcp-3.1.0/omapip/buffer.c
--- dhcp-3.1.0/omapip/buffer.c.warnings	2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/buffer.c	2007-10-23 14:33:17.000000000 -0400
@@ -438,7 +438,6 @@ isc_result_t omapi_connection_writer (om
 	int bytes_written;
 	unsigned first_byte;
 	omapi_buffer_t *buffer;
-	unsigned char *bufp;
 	omapi_connection_object_t *c;
 	isc_result_t status;
 
@@ -575,7 +574,6 @@ isc_result_t omapi_connection_put_uint32
 					  u_int32_t value)
 {
 	u_int32_t inbuf;
-	isc_result_t status;
 
 	inbuf = htonl (value);
 	
@@ -602,7 +600,6 @@ isc_result_t omapi_connection_put_uint16
 					  u_int32_t value)
 {
 	u_int16_t inbuf;
-	isc_result_t status;
 
 	inbuf = htons (value);
 	
diff -up dhcp-3.1.0/omapip/support.c.warnings dhcp-3.1.0/omapip/support.c
--- dhcp-3.1.0/omapip/support.c.warnings	2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/support.c	2007-10-23 14:33:17.000000000 -0400
@@ -53,7 +53,6 @@ omapi_object_type_t *omapi_type_auth_key
 
 omapi_object_type_t *omapi_object_types;
 int omapi_object_type_count;
-static int ot_max;
 
 #if defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
 void omapi_type_relinquish ()
@@ -298,7 +297,6 @@ isc_result_t omapi_signal (omapi_object_
 isc_result_t omapi_signal_in (omapi_object_t *handle, const char *name, ...)
 {
 	va_list ap;
-	omapi_object_t *outer;
 	isc_result_t status;
 
 	if (!handle)
@@ -368,7 +366,6 @@ isc_result_t omapi_set_value_str (omapi_
 				  const char *name,
 				  omapi_typed_data_t *value)
 {
-	omapi_object_t *outer;
 	omapi_data_string_t *nds;
 	isc_result_t status;
 
@@ -389,8 +386,6 @@ isc_result_t omapi_set_boolean_value (om
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *n = (omapi_data_string_t *)0;
-	int len;
-	int ip;
 
 	status = omapi_data_string_new (&n, strlen (name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -415,8 +410,6 @@ isc_result_t omapi_set_int_value (omapi_
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *n = (omapi_data_string_t *)0;
-	int len;
-	int ip;
 
 	status = omapi_data_string_new (&n, strlen (name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -441,8 +434,6 @@ isc_result_t omapi_set_object_value (oma
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *n = (omapi_data_string_t *)0;
-	int len;
-	int ip;
 
 	status = omapi_data_string_new (&n, strlen (name), MDL);
 	if (status != ISC_R_SUCCESS)
@@ -467,8 +458,6 @@ isc_result_t omapi_set_string_value (oma
 	isc_result_t status;
 	omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
 	omapi_data_string_t *n = (omapi_data_string_t *)0;
-	int len;
-	int ip;
 
 	status = omapi_data_string_new (&n, strlen (name), MDL);
 	if (status != ISC_R_SUCCESS)
diff -up dhcp-3.1.0/omapip/hash.c.warnings dhcp-3.1.0/omapip/hash.c
--- dhcp-3.1.0/omapip/hash.c.warnings	2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/omapip/hash.c	2007-10-23 14:33:17.000000000 -0400
@@ -103,8 +103,6 @@ void free_hash_table (tp, file, line)
 	const char *file;
 	int line;
 {
-	int i;
-	struct hash_bucket *hbc, *hbn = (struct hash_bucket *)0;
 	struct hash_table *ptr = *tp;
 
 #if defined (DEBUG_MEMORY_LEAKAGE) || \
@@ -197,7 +195,6 @@ void free_hash_bucket (ptr, file, line)
 	const char *file;
 	int line;
 {
-	struct hash_bucket *hp;
 #if defined (DEBUG_MALLOC_POOL)
 	for (hp = free_hash_buckets; hp; hp = hp -> next) {
 		if (hp == ptr) {
@@ -349,7 +346,7 @@ hash_report(struct hash_table *table)
 	struct hash_bucket *bp;
 
 	if (table->hash_count == 0)
-		return (char *) "Invalid hash table.";
+		return (unsigned char *) "Invalid hash table.";
 
 	for (i = 0 ; i < table->hash_count ; i++) {
 		curlen = 0;
@@ -378,9 +375,9 @@ hash_report(struct hash_table *table)
 	    pct > 2147483647 ||
 	    minlen > 2147483647 ||
 	    maxlen > 2147483647)
-		return (char *) "Report out of range for display.";
+		return (unsigned char *) "Report out of range for display.";
 
-	sprintf(retbuf, "Contents/Size (%%): %u/%u (%u%%). Min/max: %u/%u",
+	sprintf((char *)retbuf, "Contents/Size (%%): %u/%u (%u%%). Min/max: %u/%u",
 		contents, table->hash_count, pct, minlen, maxlen);
 
 	return retbuf;
diff -up dhcp-3.1.0/omapip/mrtrace.c.warnings dhcp-3.1.0/omapip/mrtrace.c
--- dhcp-3.1.0/omapip/mrtrace.c.warnings	2005-03-17 15:15:22.000000000 -0500
+++ dhcp-3.1.0/omapip/mrtrace.c	2007-10-23 14:33:17.000000000 -0400
@@ -85,7 +85,6 @@ void trace_mr_statp_setup (res_state sta
 	unsigned buflen = 0;
 	char *buf = (char *)0;
 	isc_result_t status;
-	u_int32_t id;
 	int i;
 
 	if (trace_playback ()) {
@@ -412,7 +411,6 @@ unsigned int trace_mr_res_randomid (unsi
 	isc_result_t status;
 
 	if (trace_playback ()) {
-		int nscount;
 		status = trace_get_packet (&trace_mr_randomid, &buflen, &buf);
 		if (status != ISC_R_SUCCESS) {
 			log_error ("trace_mr_statp: no statp packet found.");
diff -up dhcp-3.1.0/omapip/errwarn.c.warnings dhcp-3.1.0/omapip/errwarn.c
--- dhcp-3.1.0/omapip/errwarn.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/omapip/errwarn.c	2007-10-23 14:33:17.000000000 -0400
@@ -65,7 +65,7 @@ void log_fatal (const char * fmt, ... )
   va_list list;
 
   do_percentm (fbuf, fmt);
-  
+
 #ifdef LIBDHCP
   if (libdhcp_control && (libdhcp_control->eh)) {
       va_start (list, fmt);
@@ -75,6 +75,7 @@ void log_fatal (const char * fmt, ... )
       return;
   }
 #else
+  int r;
 
   /* %Audit% This is log output. %2004.06.17,Safe%
    * If we truncate we hope the user can get a hint from the log.
@@ -89,8 +90,8 @@ void log_fatal (const char * fmt, ... )
 
   /* Also log it to stderr? */
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  r = write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r = write (STDERR_FILENO, "\n", 1);
   }
 
 #if !defined (NOMINUM)
@@ -126,6 +127,8 @@ int log_error (const char * fmt, ...)
       va_end(list);
   }
 #else
+  int r;
+
   /* %Audit% This is log output. %2004.06.17,Safe%
    * If we truncate we hope the user can get a hint from the log.
    */
@@ -138,8 +141,8 @@ int log_error (const char * fmt, ...)
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  r = write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r = write (STDERR_FILENO, "\n", 1);
   }
 #endif
   return 0;
@@ -160,6 +163,8 @@ int log_info (const char *fmt, ...)
       va_end(list);
   }
 #else
+  int r;
+
   /* %Audit% This is log output. %2004.06.17,Safe%
    * If we truncate we hope the user can get a hint from the log.
    */
@@ -172,8 +177,8 @@ int log_info (const char *fmt, ...)
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  r = write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r = write (STDERR_FILENO, "\n", 1);
   }
 #endif
   return 0;
@@ -193,6 +198,8 @@ int log_debug (const char *fmt, ...)
       va_end(list);
   }
 #else
+  int r;
+
   /* %Audit% This is log output. %2004.06.17,Safe%
    * If we truncate we hope the user can get a hint from the log.
    */
@@ -205,8 +212,8 @@ int log_debug (const char *fmt, ...)
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  r = write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r = write (STDERR_FILENO, "\n", 1);
   }
 #endif
   return 0;
diff -up dhcp-3.1.0/omapip/array.c.warnings dhcp-3.1.0/omapip/array.c
--- dhcp-3.1.0/omapip/array.c.warnings	2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/array.c	2007-10-23 14:33:17.000000000 -0400
@@ -46,7 +46,6 @@ isc_result_t omapi_array_allocate (omapi
 				   omapi_array_deref_t deref,
 				   const char *file, int line)
 {
-	isc_result_t status;
 	omapi_array_t *aptr;
 
 	if (!array || *array)
@@ -63,7 +62,6 @@ isc_result_t omapi_array_allocate (omapi
 isc_result_t omapi_array_free (omapi_array_t **array,
 			       const char *file, int line)
 {
-	isc_result_t status;
 	omapi_array_t *aptr;
 	int i;
 
diff -up dhcp-3.1.0/omapip/generic.c.warnings dhcp-3.1.0/omapip/generic.c
--- dhcp-3.1.0/omapip/generic.c.warnings	2006-02-24 18:16:30.000000000 -0500
+++ dhcp-3.1.0/omapip/generic.c	2007-10-23 14:33:17.000000000 -0400
@@ -292,7 +292,6 @@ isc_result_t omapi_generic_stuff_values 
 isc_result_t omapi_generic_clear_flags (omapi_object_t *o)
 {
 	int i;
-	isc_result_t status;
 	omapi_generic_object_t *g;
 
 	if (o -> type != omapi_type_generic)
diff -up dhcp-3.1.0/omapip/convert.c.warnings dhcp-3.1.0/omapip/convert.c
--- dhcp-3.1.0/omapip/convert.c.warnings	2005-03-17 15:15:21.000000000 -0500
+++ dhcp-3.1.0/omapip/convert.c	2007-10-23 14:33:17.000000000 -0400
@@ -165,7 +165,7 @@ int binary_to_ascii (outbuf, inbuf, base
 	u_int32_t number;
 	static char h2a [] = "0123456789abcdef";
 	int power = converted_length (inbuf, base, width);
-	int i, j;
+	int i;
 
 	if (base > 16)
 		return 0;
diff -up dhcp-3.1.0/server/dhcp.c.warnings dhcp-3.1.0/server/dhcp.c
--- dhcp-3.1.0/server/dhcp.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/server/dhcp.c	2007-10-23 14:33:17.000000000 -0400
@@ -265,7 +265,7 @@ void dhcpdiscover (packet, ms_nulltp)
 
 	if (lease && lease -> client_hostname) {
 		if ((strlen (lease -> client_hostname) <= 64) &&
-		    db_printable (lease -> client_hostname))
+		    db_printable ((unsigned char *) lease -> client_hostname))
 			s = lease -> client_hostname;
 		else
 			s = "Hostname Unsuitable for Printing";
@@ -391,7 +391,6 @@ void dhcprequest (packet, ms_nulltp, ip_
 	int ours = 0;
 	struct option_cache *oc;
 	struct data_string data;
-	int status;
 	char msgbuf [1024]; /* XXX */
 	const char *s;
 	char smbuf [19];
@@ -430,7 +429,7 @@ void dhcprequest (packet, ms_nulltp, ip_
 
 	if (lease && lease -> client_hostname) {
 		if ((strlen (lease -> client_hostname) <= 64) &&
-		    db_printable (lease -> client_hostname))
+		    db_printable ((unsigned char *) lease -> client_hostname))
 			s = lease -> client_hostname;
 		else
 			s = "Hostname Unsuitable for Printing";
@@ -733,7 +732,7 @@ void dhcprelease (packet, ms_nulltp)
 
 	if (lease && lease -> client_hostname) {
 		if ((strlen (lease -> client_hostname) <= 64) &&
-		    db_printable (lease -> client_hostname))
+		    db_printable ((unsigned char *) lease -> client_hostname))
 			s = lease -> client_hostname;
 		else
 			s = "Hostname Unsuitable for Printing";
@@ -829,7 +828,7 @@ void dhcpdecline (packet, ms_nulltp)
 
 	if (lease && lease -> client_hostname) {
 		if ((strlen (lease -> client_hostname) <= 64) &&
-		    db_printable (lease -> client_hostname))
+		    db_printable ((unsigned char *) lease -> client_hostname))
 			s = lease -> client_hostname;
 		else
 			s = "Hostname Unsuitable for Printing";
@@ -927,14 +926,13 @@ void dhcpinform (packet, ms_nulltp)
 	char msgbuf [1024];
 	struct data_string d1, prl;
 	struct option_cache *oc;
-	struct expression *expr;
 	struct option_state *options = (struct option_state *)0;
 	struct dhcp_packet raw;
 	struct packet outgoing;
 	unsigned char dhcpack = DHCPACK;
 	struct subnet *subnet = (struct subnet *)0;
 	struct iaddr cip, gip;
-	unsigned i, j;
+	unsigned i;
 	int nulltp;
 	struct sockaddr_in to;
 	struct in_addr from;
@@ -1278,9 +1276,7 @@ void nak_lease (packet, cip)
 	struct packet outgoing;
 	struct hardware hto;
 	unsigned i;
-	struct data_string data;
 	struct option_state *options = (struct option_state *)0;
-	struct expression *expr;
 	struct option_cache *oc = (struct option_cache *)0;
 
 	option_state_allocate (&options, MDL);
@@ -1453,17 +1449,13 @@ void ack_lease (packet, lease, offer, wh
 	TIME max_lease_time;
 	TIME default_lease_time;
 	struct option_cache *oc;
-	struct expression *expr;
-	int status;
 	isc_result_t result;
-	int did_ping = 0;
 	TIME ping_timeout;
 	TIME lease_cltt;
 	struct in_addr from;
 
 	unsigned i, j;
-	int s1, s2;
-	int val;
+	int s1;
 	int ignorep;
 
 	/* If we're already acking this lease, don't do it again. */
@@ -2769,12 +2761,9 @@ void dhcp_reply (lease)
 	struct in_addr from;
 	struct hardware hto;
 	int result;
-	int i;
 	struct lease_state *state = lease -> state;
 	int nulltp, bootpp, unicastp = 1;
-	struct option_tag *ot, *not;
 	struct data_string d1;
-	struct option_cache *oc;
 	const char *s;
 
 	if (!state)
@@ -2851,7 +2840,7 @@ void dhcp_reply (lease)
 
 	if (lease -> client_hostname) {
 		if ((strlen (lease -> client_hostname) <= 64) &&
-		    db_printable (lease -> client_hostname))
+		    db_printable ((unsigned char *) lease -> client_hostname))
 			s = lease -> client_hostname;
 		else
 			s = "Hostname Unsuitable for Printing";
@@ -2994,7 +2983,6 @@ int find_lease (struct lease **lp,
 	struct data_string d1;
 	int have_client_identifier = 0;
 	struct data_string client_identifier;
-	int status;
 	struct hardware h;
 
 	/* Quick check to see if the peer has leases. */
@@ -3975,7 +3963,7 @@ get_server_source_address(struct in_addr
 	if (option_cache_allocate(&oc, MDL)) {
 		a = &packet->interface->primary_address;
 		if (make_const_data(&oc->expression,
-				    (char *)a, sizeof(*a),
+				    (unsigned char *)a, sizeof(*a),
 				    0, 0, MDL)) {
 			option_code_hash_lookup(&oc->option, 
 						dhcp_universe.code_hash,
diff -up dhcp-3.1.0/server/dhcpd.c.warnings dhcp-3.1.0/server/dhcpd.c
--- dhcp-3.1.0/server/dhcpd.c.warnings	2007-10-23 14:33:16.000000000 -0400
+++ dhcp-3.1.0/server/dhcpd.c	2007-10-23 14:33:17.000000000 -0400
@@ -200,7 +200,7 @@ int main (argc, argv, envp)
 	int fd;
 	int i, status;
 	struct servent *ent;
-	unsigned char *s;
+	char *s;
 	int cftest = 0;
 	int lftest = 0;
 #ifndef DEBUG
@@ -216,9 +216,6 @@ int main (argc, argv, envp)
 	struct interface_info *ip;
 	struct parse *parse;
 	int lose;
-	omapi_object_t *auth;
-	struct tsig_key *key;
-	omapi_typed_data_t *td;
 	int no_dhcpd_conf = 0;
 	int no_dhcpd_db = 0;
 	int no_dhcpd_pid = 0;
@@ -558,7 +555,8 @@ int main (argc, argv, envp)
 				if ((i = open (path_dhcpd_pid,
 					O_WRONLY | O_CREAT, 0644)) >= 0) {
 				    sprintf (pbuf, "%d\n", (int)getpid ());
-				    write (i, pbuf, strlen (pbuf));
+				    int r;
+				    r = write (i, pbuf, strlen (pbuf));
 				    close (i);
 				    pidfilewritten = 1;
 				}
@@ -599,7 +597,8 @@ int main (argc, argv, envp)
 		if ((i = open (path_dhcpd_pid,
 			       O_WRONLY | O_CREAT, 0644)) >= 0) {
 			sprintf (pbuf, "%d\n", (int)getpid ());
-			write (i, pbuf, strlen (pbuf));
+			int r;
+			r = write (i, pbuf, strlen (pbuf));
 			close (i);
 			pidfilewritten = 1;
 		}
@@ -989,7 +988,6 @@ int dhcpd_interface_setup_hook (struct i
 	   necessary. */
 	if (!ia) {
 		const char *fnn = "fallback-net";
-		char *s;
 		status = shared_network_allocate (&ip -> shared_network, MDL);
 		if (status != ISC_R_SUCCESS)
 			log_fatal ("No memory for shared subnet: %s",
diff -up dhcp-3.1.0/server/omapi.c.warnings dhcp-3.1.0/server/omapi.c
--- dhcp-3.1.0/server/omapi.c.warnings	2007-05-23 19:30:33.000000000 -0400
+++ dhcp-3.1.0/server/omapi.c	2007-10-23 14:33:17.000000000 -0400
@@ -212,7 +212,6 @@ isc_result_t dhcp_lease_set_value  (omap
 {
 	struct lease *lease;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_lease)
 		return ISC_R_INVALIDARG;
@@ -399,8 +398,6 @@ isc_result_t dhcp_lease_get_value (omapi
 isc_result_t dhcp_lease_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct lease *lease;
-	isc_result_t status;
-	u_int8_t flagbuf;
 
 	if (h -> type != dhcp_type_lease)
 		return ISC_R_INVALIDARG;
@@ -477,7 +474,6 @@ isc_result_t dhcp_lease_signal_handler (
 {
 	struct lease *lease;
 	isc_result_t status;
-	int updatep = 0;
 
 	if (h -> type != dhcp_type_lease)
 		return ISC_R_INVALIDARG;
@@ -911,9 +907,8 @@ isc_result_t dhcp_host_set_value  (omapi
 				   omapi_data_string_t *name,
 				   omapi_typed_data_t *value)
 {
-	struct host_decl *host, *hp;
+	struct host_decl *host;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_host)
 		return ISC_R_INVALIDARG;
@@ -1172,7 +1167,6 @@ isc_result_t dhcp_host_get_value (omapi_
 isc_result_t dhcp_host_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct host_decl *host;
-	isc_result_t status;
 
 	if (h -> type != dhcp_type_host)
 		return ISC_R_INVALIDARG;
@@ -1593,7 +1587,6 @@ isc_result_t dhcp_pool_set_value  (omapi
 {
 	struct pool *pool;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_pool)
 		return ISC_R_INVALIDARG;
@@ -1639,8 +1632,6 @@ isc_result_t dhcp_pool_get_value (omapi_
 isc_result_t dhcp_pool_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct pool *pool;
-	isc_result_t status;
-	struct permit *pc, *pn;
 
 	if (h -> type != dhcp_type_pool)
 		return ISC_R_INVALIDARG;
@@ -1737,10 +1728,6 @@ isc_result_t dhcp_pool_stuff_values (oma
 isc_result_t dhcp_pool_lookup (omapi_object_t **lp,
 			       omapi_object_t *id, omapi_object_t *ref)
 {
-	omapi_value_t *tv = (omapi_value_t *)0;
-	isc_result_t status;
-	struct pool *pool;
-
 	/* Can't look up pools yet. */
 
 	/* If we get to here without finding a pool, no valid key was
@@ -1914,11 +1901,6 @@ isc_result_t dhcp_class_set_value  (omap
 				    omapi_data_string_t *name,
 				    omapi_typed_data_t *value)
 {
-	struct class *class;
-	struct class *superclass = 0;
-	isc_result_t status;
-	int foo;
-
 	if (h -> type != dhcp_type_class)
 		return ISC_R_INVALIDARG;
 
@@ -1953,8 +1935,6 @@ isc_result_t dhcp_class_get_value (omapi
 isc_result_t dhcp_class_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct class *class;
-	isc_result_t status;
-	int i;
 
 	if (h -> type != dhcp_type_class && h -> type != dhcp_type_subclass)
 		return ISC_R_INVALIDARG;
@@ -2231,11 +2211,6 @@ isc_result_t dhcp_subclass_set_value  (o
 				       omapi_data_string_t *name,
 				       omapi_typed_data_t *value)
 {
-	struct class *subclass = 0;
-	struct class *superclass = 0;
-	isc_result_t status;
-	int foo;
-
 	if (h -> type != dhcp_type_subclass)
 		return ISC_R_INVALIDARG;
 
diff -up dhcp-3.1.0/server/ddns.c.warnings dhcp-3.1.0/server/ddns.c
--- dhcp-3.1.0/server/ddns.c.warnings	2007-04-27 18:48:10.000000000 -0400
+++ dhcp-3.1.0/server/ddns.c	2007-10-23 14:33:17.000000000 -0400
@@ -224,7 +224,6 @@ int ddns_updates (struct packet *packet,
 	struct data_string ddns_fwd_name;
 	struct data_string ddns_rev_name;
 	struct data_string ddns_dhcid;
-	unsigned len;
 	struct data_string d1;
 	struct option_cache *oc;
 	int s1, s2;
@@ -772,7 +771,6 @@ int ddns_removals (struct lease *lease)
 	struct data_string ddns_rev_name;
 	struct data_string ddns_dhcid;
 	isc_result_t rcode;
-	struct binding *binding;
 	int result = 0;
 	int client_updated = 0;
 
diff -up dhcp-3.1.0/server/db.c.warnings dhcp-3.1.0/server/db.c
--- dhcp-3.1.0/server/db.c.warnings	2007-06-06 19:17:51.000000000 -0400
+++ dhcp-3.1.0/server/db.c	2007-10-23 14:33:17.000000000 -0400
@@ -54,7 +54,6 @@ int write_lease (lease)
 	struct lease *lease;
 {
 	int errors = 0;
-	int i;
 	struct binding *b;
 	char *s;
 	const char *tval;
@@ -148,7 +147,6 @@ int write_lease (lease)
 			++errors;
 	}
 	if (lease -> uid_len) {
-		int i;
 		s = quotify_buf (lease -> uid, lease -> uid_len, MDL);
 		if (s) {
 			errno = 0;
@@ -222,7 +220,7 @@ int write_lease (lease)
 	    }
 	}
 	if (lease -> client_hostname &&
-	    db_printable (lease -> client_hostname)) {
+	    db_printable ((unsigned char *) lease -> client_hostname)) {
 		s = quotify_string (lease -> client_hostname, MDL);
 		if (s) {
 			errno = 0;
@@ -281,7 +279,7 @@ int write_host (host)
 		if (!new_lease_file ())
 			return 0;
 
-	if (!db_printable (host -> name))
+	if (!db_printable ((unsigned char *) host -> name))
 		return 0;
 
 	if (counting)
@@ -419,7 +417,6 @@ int write_group (group)
 	struct group_object *group;
 {
 	int errors = 0;
-	int i;
 
 	/* If the lease file is corrupt, don't try to write any more leases
 	   until we've written a good lease file. */
@@ -427,7 +424,7 @@ int write_group (group)
 		if (!new_lease_file ())
 			return 0;
 
-	if (!db_printable (group -> name))
+	if (!db_printable ((unsigned char *) group -> name))
 		return 0;
 
 	if (counting)
@@ -484,7 +481,6 @@ int write_group (group)
 #if defined (FAILOVER_PROTOCOL)
 int write_failover_state (dhcp_failover_state_t *state)
 {
-	struct tm *t;
 	int errors = 0;
 	const char *tval;
 
@@ -696,8 +692,6 @@ void write_billing_classes ()
 {
 	struct collection *lp;
 	struct class *cp;
-	struct hash_bucket *bp;
-	int i;
 
 	for (lp = collections; lp; lp = lp -> next) {
 	    for (cp = lp -> classes; cp; cp = cp -> nic) {
@@ -714,7 +708,6 @@ int write_billing_class (class)
 	struct class *class;
 {
 	int errors = 0;
-	int i;
 
 	if (lease_file_is_corrupt)
 		if (!new_lease_file ())
diff -up dhcp-3.1.0/server/confpars.c.warnings dhcp-3.1.0/server/confpars.c
--- dhcp-3.1.0/server/confpars.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/server/confpars.c	2007-10-23 14:33:17.000000000 -0400
@@ -39,7 +39,6 @@ static char copyright[] =
 
 #include "dhcpd.h"
 
-static TIME parsed_time;
 static unsigned char global_host_once = 1;
 
 #if defined (TRACING)
@@ -344,15 +343,12 @@ int parse_statement (cfile, group, type,
 	enum dhcp_token token;
 	const char *val;
 	struct shared_network *share;
-	char *t, *n;
-	struct expression *expr;
-	struct data_string data;
+	char *n;
 	struct hardware hardware;
 	struct executable_statement *et, *ep;
 	struct option *option = NULL;
 	struct option_cache *cache;
 	int lose;
-	struct data_string key_id;
 	int known;
 	isc_result_t status;
 	unsigned code;
@@ -961,7 +957,6 @@ void parse_failover_peer (cfile, group, 
 					    "load balance settings.");
 			if (token != NUMBER) {
 				parse_warn (cfile, "expecting number");
-			      badsplit:
 				skip_to_rbrace (cfile, 1);
 				dhcp_failover_state_dereference (&peer, MDL);
 				return;
@@ -1531,8 +1526,6 @@ void parse_pool_statement (cfile, group,
 
 	/* See if there's already a pool into which we can merge this one. */
 	for (pp = pool -> shared_network -> pools; pp; pp = pp -> next) {
-		struct lease *l;
-
 		if (pp -> group -> statements != pool -> group -> statements)
 			continue;
 #if defined (FAILOVER_PROTOCOL)
@@ -1843,7 +1836,6 @@ int parse_class_declaration (cp, cfile, 
 	char *name;
 	const char *tname;
 	struct executable_statement *stmt = (struct executable_statement *)0;
-	struct expression *expr;
 	int new = 1;
 	isc_result_t status = ISC_R_FAILURE;
 	int matchedonce = 0;
@@ -2298,7 +2290,6 @@ void parse_subnet_declaration (cfile, sh
 	unsigned char addr [4];
 	unsigned len = sizeof addr;
 	int declaration = 0;
-	struct interface_info *ip;
 	isc_result_t status;
 
 	subnet = (struct subnet *)0;
@@ -2577,8 +2568,6 @@ int parse_lease_declaration (struct leas
 	char tbuf [32];
 	struct lease *lease;
 	struct executable_statement *on;
-	struct expression *exp;
-	struct data_string ds;
 	int lose;
 	TIME t;
 	char *s;
@@ -3011,7 +3000,6 @@ int parse_lease_declaration (struct leas
 
 			token = peek_token (&val, (unsigned *)0, cfile);
 			if (token == STRING) {
-			    unsigned char *tuid;
 			    token = next_token (&val, &buflen, cfile);
 			    binding -> value -> type = binding_data;
 			    binding -> value -> value.data.len = buflen;
@@ -3168,7 +3156,6 @@ void parse_address_range (cfile, group, 
 	int dynamic = 0;
 	struct subnet *subnet;
 	struct shared_network *share;
-	struct pool *p;
 	struct pool *pool;
 	isc_result_t status;
 
diff -up dhcp-3.1.0/server/failover.c.warnings dhcp-3.1.0/server/failover.c
--- dhcp-3.1.0/server/failover.c.warnings	2007-06-01 18:26:58.000000000 -0400
+++ dhcp-3.1.0/server/failover.c	2007-10-23 14:33:17.000000000 -0400
@@ -64,7 +64,6 @@ void dhcp_failover_startup ()
 {
 	dhcp_failover_state_t *state;
 	isc_result_t status;
-	dhcp_failover_listener_t *l;
 
 	for (state = failover_states; state; state = state -> next) {
 		dhcp_failover_state_transition (state, "startup");
@@ -181,7 +180,6 @@ isc_result_t dhcp_failover_link_initiate
 {
 	isc_result_t status;
 	dhcp_failover_link_t *obj;
-	omapi_value_t *value = (omapi_value_t *)0;
 	dhcp_failover_state_t *state;
 	omapi_object_t *o;
 	int i;
@@ -283,8 +281,6 @@ isc_result_t dhcp_failover_link_signal (
 	isc_result_t status;
 	dhcp_failover_link_t *link;
 	omapi_object_t *c;
-	u_int16_t nlen;
-	u_int32_t vlen;
 	dhcp_failover_state_t *s, *state = (dhcp_failover_state_t *)0;
 
 	if (h -> type != dhcp_type_failover_link) {
@@ -598,7 +594,6 @@ static isc_result_t do_a_failover_option
 	unsigned op_size;
 	unsigned op_count;
 	int i;
-	isc_result_t status;
 	
 	if (link -> imsg_count + 2 > link -> imsg_len) {
 		log_error ("FAILOVER: message overflow at option code.");
@@ -1128,8 +1123,6 @@ isc_result_t dhcp_failover_listener_stuf
 					   omapi_object_t *id,
 					   omapi_object_t *p)
 {
-	int i;
-
 	if (p -> type != dhcp_type_failover_listener)
 		return ISC_R_INVALIDARG;
 
@@ -1189,11 +1182,8 @@ isc_result_t dhcp_failover_state_signal 
 					 const char *name, va_list ap)
 {
 	isc_result_t status;
-	omapi_connection_object_t *c;
-	omapi_protocol_object_t *obj;
 	dhcp_failover_state_t *state;
 	dhcp_failover_link_t *link;
-	char *peer_name;
 
 	if (!o || o -> type != dhcp_type_failover_state)
 		return ISC_R_INVALIDARG;
@@ -1844,7 +1834,6 @@ isc_result_t dhcp_failover_peer_state_ch
 	enum failover_state previous_state = state -> partner.state;
 	enum failover_state new_state;
 	int startupp;
-	isc_result_t status;
 
 	new_state = msg -> server_state;
 	startupp = (msg -> server_flags & FTF_SERVER_STARTUP) ? 1 : 0;
@@ -2287,7 +2276,6 @@ static int dhcp_failover_pool_dobalance(
 	struct lease *next = (struct lease *)0;
 	struct shared_network *s;
 	struct pool *p;
-	int polarity;
 	binding_state_t peer_lease_state;
 	binding_state_t my_lease_state;
 	struct lease **lq;
@@ -2515,7 +2503,6 @@ dhcp_failover_pool_check(struct pool *po
 
 int dhcp_failover_state_pool_check (dhcp_failover_state_t *state)
 {
-	struct lease *lp;
 	struct shared_network *s;
 	struct pool *p;
 
@@ -2844,7 +2831,7 @@ isc_result_t dhcp_failover_state_set_val
 
 void dhcp_failover_keepalive (void *vs)
 {
-	dhcp_failover_state_t *state = vs;
+	return;
 }
 
 void dhcp_failover_reconnect (void *vs)
@@ -2878,7 +2865,6 @@ void dhcp_failover_reconnect (void *vs)
 void dhcp_failover_startup_timeout (void *vs)
 {
 	dhcp_failover_state_t *state = vs;
-	isc_result_t status;
 
 #if defined (DEBUG_FAILOVER_TIMING)
 	log_info ("dhcp_failover_startup_timeout");
@@ -2890,7 +2876,6 @@ void dhcp_failover_startup_timeout (void
 void dhcp_failover_link_startup_timeout (void *vl)
 {
 	dhcp_failover_link_t *link = vl;
-	isc_result_t status;
 	omapi_object_t *p;
 
 	for (p = (omapi_object_t *)link; p -> inner; p = p -> inner)
@@ -3369,7 +3354,6 @@ isc_result_t dhcp_failover_state_remove 
 int dhcp_failover_state_match (dhcp_failover_state_t *state,
 			       u_int8_t *addr, unsigned addrlen)
 {
-	struct option_cache *oc;
 	struct data_string ds;
 	int i;
 	
@@ -3949,7 +3933,6 @@ isc_result_t dhcp_failover_put_message (
 					omapi_object_t *connection,
 					int msg_type, u_int32_t xid, ...)
 {
-	unsigned count = 0;
 	unsigned size = 0;
 	int bad_option = 0;
 	int opix = 0;
@@ -4062,7 +4045,6 @@ void dhcp_failover_timeout (void *vstate
 {
 	dhcp_failover_state_t *state = vstate;
 	dhcp_failover_link_t *link;
-	isc_result_t status;
 
 #if defined (DEBUG_FAILOVER_TIMING)
 	log_info ("dhcp_failover_timeout");
@@ -4182,7 +4164,6 @@ isc_result_t dhcp_failover_send_connect 
 	dhcp_failover_link_t *link;
 	dhcp_failover_state_t *state;
 	isc_result_t status;
-	char hba [32];
 #if defined (DEBUG_FAILOVER_MESSAGES)	
 	char obuf [64];
 	unsigned obufix = 0;
@@ -5189,7 +5170,7 @@ isc_result_t dhcp_failover_generate_upda
 {
 	struct shared_network *s;
 	struct pool *p;
-	struct lease *l, *n;
+	struct lease *l;
 	int i;
 #define FREE_LEASES 0
 #define ACTIVE_LEASES 1
diff -up dhcp-3.1.0/server/mdb.c.warnings dhcp-3.1.0/server/mdb.c
--- dhcp-3.1.0/server/mdb.c.warnings	2007-10-23 14:33:16.000000000 -0400
+++ dhcp-3.1.0/server/mdb.c	2007-10-23 14:33:17.000000000 -0400
@@ -317,7 +317,6 @@ isc_result_t delete_host (hd, commit)
 	struct host_decl *hp = (struct host_decl *)0;
 	struct host_decl *np = (struct host_decl *)0;
 	struct host_decl *foo;
-	struct executable_statement *esp;
 	int hw_head = 0, uid_head = 1;
 
 	/* Don't need to do it twice. */
@@ -452,7 +451,6 @@ int find_hosts_by_haddr (struct host_dec
 			 const unsigned char *haddr, unsigned hlen,
 			 const char *file, int line)
 {
-	struct host_decl *foo;
 	struct hardware h;
 	int ret;
 
@@ -488,7 +486,6 @@ int find_host_for_network (struct subnet
 			   struct iaddr *addr, struct shared_network *share)
 {
 	int i;
-	struct subnet *subnet;
 	struct iaddr ip_address;
 	struct host_decl *hp;
 	struct data_string fixed_addr;
@@ -538,12 +535,11 @@ void new_address_range (cfile, low, high
 	struct pool *pool;
 	struct lease **lpchain;
 {
-	struct lease *address_range, *lp, *plp;
+	struct lease *address_range;
 	struct iaddr net;
 	unsigned min, max, i;
 	char lowbuf [16], highbuf [16], netbuf [16];
 	struct shared_network *share = subnet -> shared_network;
-	isc_result_t status;
 	struct lease *lt = (struct lease *)0;
 
 	/* All subnets should have attached shared network structures. */
@@ -832,7 +828,6 @@ void enter_lease (lease)
 	struct lease *lease;
 {
 	struct lease *comp = (struct lease *)0;
-	isc_result_t status;
 
 	if (find_lease_by_ip_addr (&comp, lease -> ip_addr, MDL)) {
 		if (!comp -> pool) {
@@ -879,7 +874,6 @@ int supersede_lease (comp, lease, commit
 	int pimmediate;
 {
 	struct lease *lp, **lq, *prev;
-	TIME lp_next_state;
 #if defined (FAILOVER_PROTOCOL)
 	int do_pool_check = 0;
 
@@ -1571,7 +1565,6 @@ void pool_timer (vpool)
 	void *vpool;
 {
 	struct pool *pool;
-	struct lease *lt = (struct lease *)0;
 	struct lease *next = (struct lease *)0;
 	struct lease *lease = (struct lease *)0;
 #define FREE_LEASES 0
@@ -2295,7 +2288,6 @@ void expire_all_pools ()
 {
 	struct shared_network *s;
 	struct pool *p;
-	struct hash_bucket *hb;
 	int i;
 	struct lease *l;
 	struct lease **lptr[RESERVED_LEASES+1];
diff -up dhcp-3.1.0/dst/dst_api.c.warnings dhcp-3.1.0/dst/dst_api.c
--- dhcp-3.1.0/dst/dst_api.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/dst/dst_api.c	2007-10-23 14:33:17.000000000 -0400
@@ -475,7 +475,7 @@ dst_s_read_public_key(const char *in_nam
 	int proto, alg, dlen;
 	int c;
 	char name[PATH_MAX], enckey[RAW_KEY_SIZE];
-        unsigned char *notspace;
+	char *notspace;
 	u_char deckey[RAW_KEY_SIZE];
 	FILE *fp;
 
@@ -548,7 +548,8 @@ dst_s_read_public_key(const char *in_nam
 		return (NULL);
 	}
 	/* read in the key string */
-	fgets(enckey, sizeof(enckey), fp);
+	char *r;
+	r = fgets(enckey, sizeof(enckey), fp);
 
 	/* If we aren't at end-of-file, something is wrong.  */
 	while ((c = getc(fp)) != EOF)
diff -up dhcp-3.1.0/dst/prandom.c.warnings dhcp-3.1.0/dst/prandom.c
--- dhcp-3.1.0/dst/prandom.c.warnings	2001-02-22 02:22:09.000000000 -0500
+++ dhcp-3.1.0/dst/prandom.c	2007-10-23 14:33:17.000000000 -0400
@@ -335,7 +335,7 @@ unix_cmd(dst_work *work)
 		cnt += do_time(work);
 	}
 	while ((n = fread(buffer, sizeof(char), sizeof(buffer), pipe)) > 0)
-		NULL; /* drain the pipe */
+		continue; /* drain the pipe */
 	pclose(pipe);
 	return (cnt);		/* read how many bytes where read in */
 }
diff -up dhcp-3.1.0/common/conflex.c.warnings dhcp-3.1.0/common/conflex.c
--- dhcp-3.1.0/common/conflex.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/conflex.c	2007-10-23 14:33:17.000000000 -0400
@@ -518,13 +518,15 @@ static enum dhcp_token read_num_or_name 
 	cfile -> tokbuf [i] = 0;
 	cfile -> tlen = i;
 	cfile -> tval = cfile -> tokbuf;
-	return intern (cfile -> tval, rv);
+	return intern ((unsigned char *)cfile -> tval, rv);
 }
 
-static enum dhcp_token intern (atom, dfv)
-	unsigned char *atom;
+static enum dhcp_token intern (inatom, dfv)
+	unsigned char *inatom;
 	enum dhcp_token dfv;
 {
+	char *atom = (char *) inatom;
+
 	if (!isascii (atom [0]))
 		return dfv;
 
diff -up dhcp-3.1.0/common/socket.c.warnings dhcp-3.1.0/common/socket.c
--- dhcp-3.1.0/common/socket.c.warnings	2006-07-25 13:41:18.000000000 -0400
+++ dhcp-3.1.0/common/socket.c	2007-10-23 14:33:17.000000000 -0400
@@ -55,8 +55,6 @@ static char copyright[] =
 # endif
 #endif
 
-static int once = 0;
-
 /* Reinitializes the specified interface after an address change.   This
    is not required for packet-filter APIs. */
 
diff -up dhcp-3.1.0/common/parse.c.warnings dhcp-3.1.0/common/parse.c
--- dhcp-3.1.0/common/parse.c.warnings	2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/common/parse.c	2007-10-23 14:33:17.000000000 -0400
@@ -311,9 +311,6 @@ int parse_ip_addr (cfile, addr)
 	struct parse *cfile;
 	struct iaddr *addr;
 {
-	const char *val;
-	enum dhcp_token token;
-
 	addr -> len = 4;
 	if (parse_numeric_aggregate (cfile, addr -> iabuf,
 				     &addr -> len, DOT, 10, 8))
@@ -614,7 +611,7 @@ void convert_num (cfile, buf, str, base,
 	int base;
 	unsigned size;
 {
-	const unsigned char *ptr = str;
+	const unsigned char *ptr = (const unsigned char *) str;
 	int negative = 0;
 	u_int32_t val = 0;
 	int tval;
@@ -742,7 +739,6 @@ void convert_num (cfile, buf, str, base,
 TIME parse_date (cfile)
 	struct parse *cfile;
 {
-	struct tm tm;
 	int guess;
 	int tzoff, wday, year, mon, mday, hour, min, sec;
 	const char *val;
@@ -1306,7 +1302,6 @@ int parse_option_code_definition (cfile,
 	char tokbuf [128];
 	unsigned tokix = 0;
 	char type;
-	int code;
 	int is_signed;
 	char *s;
 	int has_encapsulation = 0;
@@ -1807,7 +1802,6 @@ int parse_executable_statement (result, 
 	enum dhcp_token token;
 	const char *val;
 	unsigned len;
-	struct executable_statement base;
 	struct class *cta;
 	struct option *option=NULL;
 	struct option_cache *cache;
@@ -2147,7 +2141,6 @@ int parse_executable_statement (result, 
 		if (token != NAME && token != NUMBER_OR_NAME) {
 			parse_warn (cfile,
 				    "%s can't be a variable name", val);
-		      badunset:
 			skip_to_semi (cfile);
 			*lose = 1;
 			return 0;
@@ -3198,16 +3191,13 @@ int parse_non_binary (expr, cfile, lose,
 	enum dhcp_token token;
 	const char *val;
 	struct collection *col;
-	struct option *option;
 	struct expression *nexp, **ep;
 	int known;
 	enum expr_op opcode;
 	const char *s;
 	char *cptr;
-	struct executable_statement *stmt;
-	int i;
 	unsigned long u;
-	isc_result_t status, code;
+	isc_result_t status;
 	unsigned len;
 
 	token = peek_token (&val, (unsigned *)0, cfile);
@@ -3735,7 +3725,6 @@ int parse_non_binary (expr, cfile, lose,
 					parse_warn
 						(cfile,
 						 "expecting dns expression.");
-			      badnstrans:
 				expression_dereference (expr, MDL);
 				*lose = 1;
 				return 0;
@@ -4646,8 +4635,6 @@ int parse_option_statement (result, cfil
 	struct expression *expr = (struct expression *)0;
 	struct expression *tmp;
 	int lose;
-	struct executable_statement *stmt;
-	int ftt = 1;
 
 	token = peek_token (&val, (unsigned *)0, cfile);
 	if (token == SEMI) {
@@ -4764,9 +4751,7 @@ int parse_option_token (rv, cfile, fmt, 
 	struct expression *t = (struct expression *)0;
 	unsigned char buf [4];
 	unsigned len;
-	unsigned char *ob;
 	struct iaddr addr;
-	int num;
 	const char *f, *g;
 	struct enumeration_value *e;
 
@@ -5019,8 +5004,6 @@ int parse_option_decl (oc, cfile)
 		/* Set a flag if this is an array of a simple type (i.e.,
 		   not an array of pairs of IP addresses, or something
 		   like that. */
-		int uniform = option -> format [1] == 'A';
-
 		for (fmt = option -> format; *fmt; fmt++) {
 			if (*fmt == 'A')
 				break;
@@ -5221,7 +5204,6 @@ int parse_X (cfile, buf, max)
 	int token;
 	const char *val;
 	unsigned len;
-	u_int8_t *s;
 
 	token = peek_token (&val, (unsigned *)0, cfile);
 	if (token == NUMBER_OR_NAME || token == NUMBER) {
@@ -5265,6 +5247,7 @@ int parse_X (cfile, buf, max)
 
 int parse_warn (struct parse *cfile, const char *fmt, ...)
 {
+	int l;
 	va_list list;
 	char lexbuf [256];
 	char mbuf [1024];
@@ -5288,9 +5271,10 @@ int parse_warn (struct parse *cfile, con
 		if (lix < (sizeof lexbuf) - 1)
 			lexbuf [lix++] = ' ';
 		if (cfile -> token_line [i] == '\t') {
-			for (lix;
-			     lix < (sizeof lexbuf) - 1 && (lix & 7); lix++)
+			while (lix < (sizeof lexbuf) - 1 && (lix & 7)) {
 				lexbuf [lix] = ' ';
+				lix++;
+			}
 		}
 	}
 	lexbuf [lix] = 0;
@@ -5303,14 +5287,14 @@ int parse_warn (struct parse *cfile, con
 #endif
 
 	if (log_perror) {
-		write (STDERR_FILENO, mbuf, strlen (mbuf));
-		write (STDERR_FILENO, "\n", 1);
-		write (STDERR_FILENO, cfile -> token_line,
+		l = write (STDERR_FILENO, mbuf, strlen (mbuf));
+		l = write (STDERR_FILENO, "\n", 1);
+		l = write (STDERR_FILENO, cfile -> token_line,
 		       strlen (cfile -> token_line));
-		write (STDERR_FILENO, "\n", 1);
+		l = write (STDERR_FILENO, "\n", 1);
 		if (cfile -> lexchar < 81)
-			write (STDERR_FILENO, lexbuf, lix);
-		write (STDERR_FILENO, "^\n", 2);
+			l = write (STDERR_FILENO, lexbuf, lix);
+		l = write (STDERR_FILENO, "^\n", 2);
 	}
 
 	cfile -> warnings_occurred = 1;
diff -up dhcp-3.1.0/common/alloc.c.warnings dhcp-3.1.0/common/alloc.c
--- dhcp-3.1.0/common/alloc.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/alloc.c	2007-10-23 14:33:17.000000000 -0400
@@ -48,7 +48,6 @@ int option_chain_head_allocate (ptr, fil
 	const char *file;
 	int line;
 {
-	int size;
 	struct option_chain_head *h;
 
 	if (!ptr) {
@@ -109,7 +108,6 @@ int option_chain_head_dereference (ptr, 
 	const char *file;
 	int line;
 {
-	int i;
 	struct option_chain_head *option_chain_head;
 	pair car, cdr;
 
@@ -161,7 +159,6 @@ int group_allocate (ptr, file, line)
 	const char *file;
 	int line;
 {
-	int size;
 	struct group *g;
 
 	if (!ptr) {
@@ -222,7 +219,6 @@ int group_dereference (ptr, file, line)
 	const char *file;
 	int line;
 {
-	int i;
 	struct group *group;
 
 	if (!ptr || !*ptr) {
@@ -741,8 +737,6 @@ int buffer_dereference (ptr, file, line)
 	const char *file;
 	int line;
 {
-	struct buffer *bp;
-
 	if (!ptr) {
 		log_error ("%s(%d): null pointer", file, line);
 #if defined (POINTER_DEBUG)
@@ -830,8 +824,6 @@ int dns_host_entry_dereference (ptr, fil
 	const char *file;
 	int line;
 {
-	struct dns_host_entry *bp;
-
 	if (!ptr || !*ptr) {
 		log_error ("%s(%d): null pointer", file, line);
 #if defined (POINTER_DEBUG)
@@ -1037,7 +1029,6 @@ int packet_allocate (ptr, file, line)
 	const char *file;
 	int line;
 {
-	int size;
 	struct packet *p;
 
 	if (!ptr) {
@@ -1157,7 +1148,6 @@ int dns_zone_allocate (ptr, file, line)
 	const char *file;
 	int line;
 {
-	int size;
 	struct dns_zone *d;
 
 	if (!ptr) {
diff -up dhcp-3.1.0/common/lpf.c.warnings dhcp-3.1.0/common/lpf.c
--- dhcp-3.1.0/common/lpf.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/lpf.c	2007-10-23 14:33:17.000000000 -0400
@@ -84,8 +84,6 @@ int if_register_lpf (info)
 	struct interface_info *info;
 {
 	int sock;
-	char filename[50];
-	int b;
 	union {
 		struct sockaddr_ll ll;
 		struct sockaddr common;
@@ -362,7 +360,6 @@ ssize_t receive_packet (interface, buf, 
 	struct sockaddr_in *from;
 	struct hardware *hfrom;
 {
-	int nread;
 	int length = 0;
 	int offset = 0;
 	int nocsum = 0;
diff -up dhcp-3.1.0/common/memory.c.warnings dhcp-3.1.0/common/memory.c
--- dhcp-3.1.0/common/memory.c.warnings	2006-06-01 16:23:17.000000000 -0400
+++ dhcp-3.1.0/common/memory.c	2007-10-23 14:33:17.000000000 -0400
@@ -84,8 +84,7 @@ isc_result_t delete_group (struct group_
 
 isc_result_t supersede_group (struct group_object *group, int writep)
 {
-	struct group_object *t, *u;
-	isc_result_t status;
+	struct group_object *t;
 
 	/* Register the group in the group name hash table,
 	   so we can look it up later. */
@@ -142,7 +141,6 @@ isc_result_t supersede_group (struct gro
 int clone_group (struct group **gp, struct group *group,
 		 const char *file, int line)
 {
-	isc_result_t status;
 	struct group *g = (struct group *)0;
 
 	/* Normally gp should contain the null pointer, but for convenience
diff -up dhcp-3.1.0/common/comapi.c.warnings dhcp-3.1.0/common/comapi.c
--- dhcp-3.1.0/common/comapi.c.warnings	2006-02-24 18:16:28.000000000 -0500
+++ dhcp-3.1.0/common/comapi.c	2007-10-23 14:33:17.000000000 -0400
@@ -143,7 +143,6 @@ isc_result_t dhcp_group_set_value  (omap
 {
 	struct group_object *group;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_group)
 		return ISC_R_INVALIDARG;
@@ -217,7 +216,6 @@ isc_result_t dhcp_group_get_value (omapi
 {
 	struct group_object *group;
 	isc_result_t status;
-	struct data_string ip_addrs;
 
 	if (h -> type != dhcp_type_group)
 		return ISC_R_INVALIDARG;
@@ -240,7 +238,6 @@ isc_result_t dhcp_group_get_value (omapi
 isc_result_t dhcp_group_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct group_object *group, *t;
-	isc_result_t status;
 
 	if (h -> type != dhcp_type_group)
 		return ISC_R_INVALIDARG;
@@ -271,7 +268,7 @@ isc_result_t dhcp_group_destroy (omapi_o
 isc_result_t dhcp_group_signal_handler (omapi_object_t *h,
 					const char *name, va_list ap)
 {
-	struct group_object *group, *t;
+	struct group_object *group;
 	isc_result_t status;
 	int updatep = 0;
 
@@ -453,7 +450,6 @@ isc_result_t dhcp_control_set_value  (om
 {
 	dhcp_control_object_t *control;
 	isc_result_t status;
-	int foo;
 	unsigned long newstate;
 
 	if (h -> type != dhcp_type_control)
@@ -488,7 +484,6 @@ isc_result_t dhcp_control_get_value (oma
 {
 	dhcp_control_object_t *control;
 	isc_result_t status;
-	struct data_string ip_addrs;
 
 	if (h -> type != dhcp_type_control)
 		return ISC_R_INVALIDARG;
@@ -511,9 +506,6 @@ isc_result_t dhcp_control_get_value (oma
 isc_result_t dhcp_control_destroy (omapi_object_t *h,
 				   const char *file, int line)
 {
-	dhcp_control_object_t *control, *t;
-	isc_result_t status;
-
 	if (h -> type != dhcp_type_control)
 		return ISC_R_INVALIDARG;
 
@@ -524,9 +516,8 @@ isc_result_t dhcp_control_destroy (omapi
 isc_result_t dhcp_control_signal_handler (omapi_object_t *h,
 					const char *name, va_list ap)
 {
-	dhcp_control_object_t *control, *t;
+	dhcp_control_object_t *control;
 	isc_result_t status;
-	int updatep = 0;
 
 	if (h -> type != dhcp_type_control)
 		return ISC_R_INVALIDARG;
@@ -580,7 +571,6 @@ isc_result_t dhcp_control_lookup (omapi_
 {
 	omapi_value_t *tv = (omapi_value_t *)0;
 	isc_result_t status;
-	dhcp_control_object_t *control;
 
 	/* First see if we were sent a handle. */
 	if (ref) {
@@ -629,7 +619,6 @@ isc_result_t dhcp_subnet_set_value  (oma
 {
 	struct subnet *subnet;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_subnet)
 		return ISC_R_INVALIDARG;
@@ -675,7 +664,6 @@ isc_result_t dhcp_subnet_get_value (omap
 isc_result_t dhcp_subnet_destroy (omapi_object_t *h, const char *file, int line)
 {
 	struct subnet *subnet;
-	isc_result_t status;
 
 	if (h -> type != dhcp_type_subnet)
 		return ISC_R_INVALIDARG;
@@ -752,10 +740,6 @@ isc_result_t dhcp_subnet_lookup (omapi_o
 				 omapi_object_t *id,
 				 omapi_object_t *ref)
 {
-	omapi_value_t *tv = (omapi_value_t *)0;
-	isc_result_t status;
-	struct subnet *subnet;
-
 	/* Can't look up subnets yet. */
 
 	/* If we get to here without finding a subnet, no valid key was
@@ -784,7 +768,6 @@ isc_result_t dhcp_shared_network_set_val
 {
 	struct shared_network *shared_network;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_shared_network)
 		return ISC_R_INVALIDARG;
@@ -832,7 +815,6 @@ isc_result_t dhcp_shared_network_destroy
 					  const char *file, int line)
 {
 	struct shared_network *shared_network;
-	isc_result_t status;
 
 	if (h -> type != dhcp_type_shared_network)
 		return ISC_R_INVALIDARG;
@@ -922,10 +904,6 @@ isc_result_t dhcp_shared_network_lookup 
 					 omapi_object_t *id,
 					 omapi_object_t *ref)
 {
-	omapi_value_t *tv = (omapi_value_t *)0;
-	isc_result_t status;
-	struct shared_network *shared_network;
-
 	/* Can't look up shared_networks yet. */
 
 	/* If we get to here without finding a shared_network, no valid key was
diff -up dhcp-3.1.0/common/icmp.c.warnings dhcp-3.1.0/common/icmp.c
--- dhcp-3.1.0/common/icmp.c.warnings	2005-03-17 15:14:58.000000000 -0500
+++ dhcp-3.1.0/common/icmp.c	2007-10-23 14:33:17.000000000 -0400
@@ -61,11 +61,7 @@ void icmp_startup (routep, handler)
 {
 	struct protoent *proto;
 	int protocol = 1;
-	struct sockaddr_in from;
-	int fd;
 	int state;
-	struct icmp_state *new;
-	omapi_object_t *h;
 	isc_result_t result;
 
 	/* Only initialize icmp once. */
@@ -284,7 +280,6 @@ isc_result_t icmp_echoreply (h)
 void trace_icmp_input_input (trace_type_t *ttype, unsigned length, char *buf)
 {
 	struct iaddr *ia;
-	unsigned len;
 	u_int8_t *icbuf;
 	ia = (struct iaddr *)buf;
 	ia->len = ntohl(ia->len);
diff -up dhcp-3.1.0/common/inet.c.warnings dhcp-3.1.0/common/inet.c
--- dhcp-3.1.0/common/inet.c.warnings	2006-05-15 11:07:49.000000000 -0400
+++ dhcp-3.1.0/common/inet.c	2007-10-23 14:33:17.000000000 -0400
@@ -124,7 +124,7 @@ struct iaddr broadcast_addr (subnet, mas
 	struct iaddr subnet;
 	struct iaddr mask;
 {
-	int i, j, k;
+	int i;
 	struct iaddr rv;
 
 	if (subnet.len > sizeof(subnet.iabuf))
diff -up dhcp-3.1.0/common/dns.c.warnings dhcp-3.1.0/common/dns.c
--- dhcp-3.1.0/common/dns.c.warnings	2006-07-19 13:14:55.000000000 -0400
+++ dhcp-3.1.0/common/dns.c	2007-10-23 14:33:17.000000000 -0400
@@ -127,7 +127,6 @@ dns_zone_hash_t *dns_zone_hash;
 isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname,
 			    struct dns_zone *zone)
 {
-	isc_result_t status;
 	ns_tsig_key *tkey;
 
 	if (!zone)
@@ -201,7 +200,6 @@ isc_result_t enter_dns_zone (struct dns_
 
 isc_result_t dns_zone_lookup (struct dns_zone **zone, const char *name)
 {
-	struct dns_zone *tz = (struct dns_zone *)0;
 	int len;
 	char *tname = (char *)0;
 	isc_result_t status;
@@ -234,7 +232,6 @@ int dns_zone_dereference (ptr, file, lin
 	const char *file;
 	int line;
 {
-	int i;
 	struct dns_zone *dns_zone;
 
 	if (!ptr || !*ptr) {
@@ -397,9 +394,7 @@ void repudiate_zone (struct dns_zone **z
 void cache_found_zone (ns_class class,
 		       char *zname, struct in_addr *addrs, int naddrs)
 {
-	isc_result_t status = ISC_R_NOTFOUND;
 	struct dns_zone *zone = (struct dns_zone *)0;
-	struct data_string nsaddrs;
 	int ix = strlen (zname);
 
 	if (zname [ix - 1] == '.')
@@ -678,7 +673,7 @@ ddns_update_a(struct data_string *ddns_f
 		/*
 		 * Conflict detection override: delete DHCID RRs.
 		 */
-		updrec = minires_mkupdrec(S_UPDATE, ddns_fwd_name->data,
+		updrec = minires_mkupdrec(S_UPDATE, (char *)ddns_fwd_name->data,
 					  C_IN, T_DHCID, 0);
 
 		if (!updrec) {
diff -up dhcp-3.1.0/common/tree.c.warnings dhcp-3.1.0/common/tree.c
--- dhcp-3.1.0/common/tree.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/tree.c	2007-10-23 14:33:17.000000000 -0400
@@ -51,61 +51,6 @@ struct __res_state resolver_state;
 int resolver_inited = 0;
 #endif
 
-static void
-append_to_ary(char **ary_ptr, int *ary_size, int ary_capacity,
-	      char *new_element)
-{
-	/* INSIST(ary_ptr != NULL); */
-	/* INSIST(ary_size != NULL); */
-	/* INSIST(ary_capacity > 1); */
-
-	if (new_element == NULL)
-		return;
-
-	if (*ary_size >= ary_capacity) {
-		log_fatal("Improbable error at %s:%d.", MDL);
-		return;
-	}
-
-	ary_ptr[(*ary_size)++] = new_element;
-}
-
-static char *
-data_string_to_char_string(struct data_string *d)
-{
-	char *str, *start, *end;
-	const unsigned char *pos;
-	int len;
-
-	if (d == NULL);
-		return NULL;
-
-	pos = d->data;
-
-	if (pos == NULL)
-		return NULL;
-
-	/* Per byte could be "\777" at worst, plus null terminator. */
-	len = (d->len * 4) + 1;
-	str = dmalloc(len, MDL);
-	if (!str)
-		return NULL;
-
-	start = str;
-	end = start + len;
-
-	if (pretty_escape(&start, end, &pos, pos + d->len) < 0) {
-		dfree(str, MDL);
-		return NULL;
-	}
-
-	/* dmalloc() sets the buffer to zero - there is no need to null
-	 * terminate.
-	 */
-
-	return str;
-}
-
 pair cons (car, cdr)
 	caddr_t car;
 	pair cdr;
@@ -305,8 +250,6 @@ int make_limit (new, expr, limit)
 	struct expression *expr;
 	int limit;
 {
-	struct expression *rv;
-
 	/* Allocate a node to enforce a limit on evaluation. */
 	if (!expression_allocate (new, MDL))
 		log_error ("no memory for limit expression");
@@ -700,11 +643,10 @@ int evaluate_dns_expression (result, pac
 	struct binding_scope **scope;
 	struct expression *expr;
 {
-	ns_updrec *foo;
 	unsigned long ttl = 0;
 	char *tname;
 	struct data_string name, data;
-	int r0, r1, r2, r3;
+	int r0, r1, r2;
 
 	if (!result || *result) {
 		log_error ("evaluate_dns_expression called with non-null %s",
@@ -961,10 +903,7 @@ int evaluate_boolean_expression (result,
 	struct binding_scope **scope;
 	struct expression *expr;
 {
-	struct data_string left, right;
-	struct data_string rrtype, rrname, rrdata;
-	unsigned long ttl;
-	int srrtype, srrname, srrdata, sttl;
+	struct data_string left;
 	int bleft, bright;
 	int sleft, sright;
 	struct binding *binding;
@@ -1957,7 +1896,6 @@ int evaluate_data_expression (result, pa
 					       MDL);
 
 		if (s0 && s1) {
-			char *upper;
 			int i;
 
 			/* The buffer must be a multiple of the number's
@@ -3280,8 +3218,6 @@ static int op_val (op)
 int op_precedence (op1, op2)
 	enum expr_op op1, op2;
 {
-	int ov1, ov2;
-
 	return op_val (op1) - op_val (op2);
 }
 
@@ -3382,7 +3318,6 @@ int write_expression (file, expr, col, i
 	int firstp;
 {
 	struct expression *e;
-	struct expression *next_arg;
 	const char *s;
 	char obuf [65];
 	int scol;
@@ -3913,7 +3848,6 @@ int binding_scope_dereference (ptr, file
 	const char *file;
 	int line;
 {
-	int i;
 	struct binding_scope *binding_scope;
 
 	if (!ptr || !*ptr) {
diff -up dhcp-3.1.0/common/print.c.warnings dhcp-3.1.0/common/print.c
--- dhcp-3.1.0/common/print.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/print.c	2007-10-23 14:33:17.000000000 -0400
@@ -47,7 +47,7 @@ char *quotify_string (const char *s, con
 	const unsigned char *sp;
 	char *buf, *nsp;
 
-	for (sp = s; sp && *sp; sp++) {
+	for (sp = (unsigned char *)s; sp && *sp; sp++) {
 		if (*sp == ' ')
 			len++;
 		else if (!isascii (*sp) || !isprint (*sp))
@@ -61,7 +61,7 @@ char *quotify_string (const char *s, con
 	buf = dmalloc (len + 1, file, line);
 	if (buf) {
 		nsp = buf;
-		for (sp = s; sp && *sp; sp++) {
+		for (sp = (unsigned char *)s; sp && *sp; sp++) {
 			if (*sp == ' ')
 				*nsp++ = ' ';
 			else if (!isascii (*sp) || !isprint (*sp)) {
@@ -461,7 +461,6 @@ static unsigned print_subexpression (exp
 {
 	unsigned rv, left;
 	const char *s;
-	struct expression *next_arg;
 
 	switch (expr -> op) {
 	      case expr_none:
@@ -1076,7 +1075,6 @@ int token_print_indent_concat (FILE *fil
 			       const char *suffix, ...)
 {
 	va_list list;
-	char *buf;
 	unsigned len;
 	char *s, *t, *u;
 
@@ -1114,7 +1112,6 @@ int token_indent_data_string (FILE *file
 			      struct data_string *data)
 {
 	int i;
-	char *buf;
 	char obuf [3];
 
 	/* See if this is just ASCII. */
diff -up dhcp-3.1.0/common/discover.c.warnings dhcp-3.1.0/common/discover.c
--- dhcp-3.1.0/common/discover.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/discover.c	2007-10-23 14:33:17.000000000 -0400
@@ -128,16 +128,14 @@ int have_setup_fallback = 0;
 void discover_interfaces (state)
 	int state;
 {
-	struct interface_info *tmp, *ip;
+	struct interface_info *tmp;
 	struct interface_info *last, *next;
 	char buf [2048];
 	struct ifconf ic;
 	struct ifreq ifr;
 	int i;
 	int sock;
-	int address_count = 0;
 	struct subnet *subnet;
-	struct shared_network *share;
 	struct sockaddr_in foo;
 	int ir;
 	struct ifreq *tif;
@@ -441,7 +439,6 @@ void discover_interfaces (state)
 	for (tmp = interfaces; tmp; tmp = tmp -> next) {
 		struct ifreq ifr;
 		struct sockaddr sa;
-		int b, sk;
 		
 		if (!tmp -> ifp) {
 			/* Make up an ifreq structure. */
@@ -828,7 +825,6 @@ isc_result_t dhcp_interface_set_value  (
 {
 	struct interface_info *interface;
 	isc_result_t status;
-	int foo;
 
 	if (h -> type != dhcp_type_interface)
 		return ISC_R_INVALIDARG;
@@ -871,7 +867,6 @@ isc_result_t dhcp_interface_destroy (oma
 					 const char *file, int line)
 {
 	struct interface_info *interface;
-	isc_result_t status;
 
 	if (h -> type != dhcp_type_interface)
 		return ISC_R_INVALIDARG;
@@ -901,8 +896,6 @@ isc_result_t dhcp_interface_signal_handl
 					    const char *name, va_list ap)
 {
 	struct interface_info *ip, *interface;
-	struct client_config *config;
-	struct client_state *client;
 	isc_result_t status;
 
 	if (h -> type != dhcp_type_interface)
diff -up dhcp-3.1.0/common/options.c.warnings dhcp-3.1.0/common/options.c
--- dhcp-3.1.0/common/options.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/common/options.c	2007-10-23 14:50:34.000000000 -0400
@@ -43,9 +43,6 @@ static char copyright[] =
 
 struct option *vendor_cfg_option;
 
-static void do_option_set PROTO ((pair *,
-				  struct option_cache *,
-				  enum statement_op));
 static int pretty_text(char **, char *, const unsigned char **,
 			 const unsigned char *, int);
 static int pretty_domain(char **, char *, const unsigned char **,
@@ -56,7 +53,6 @@ static int pretty_domain(char **, char *
 int parse_options (packet)
 	struct packet *packet;
 {
-	int i;
 	struct option_cache *op = (struct option_cache *)0;
 
 	/* Allocate a new option state. */
@@ -136,8 +132,6 @@ int parse_option_buffer (options, buffer
 	unsigned length;
 	struct universe *universe;
 {
-	unsigned char *t;
-	const unsigned char *end = buffer + length;
 	unsigned len, offset;
 	unsigned code;
 	struct option_cache *op = (struct option_cache *)0;
@@ -313,7 +307,6 @@ int fqdn_universe_decode (struct option_
 			  const unsigned char *buffer,
 			  unsigned length, struct universe *u)
 {
-	char *name;
 	struct buffer *bp = (struct buffer *)0;
 
 	/* FQDN options have to be at least four bytes long. */
@@ -500,9 +493,7 @@ int cons_options (inpacket, outpacket, l
 	int priority_len;
 	unsigned char buffer [4096];	/* Really big buffer... */
 	unsigned main_buffer_size, mb_max;
-	unsigned mainbufix, bufix, agentix;
-	int fileix;
-	int snameix;
+	unsigned mainbufix, agentix;
 	unsigned option_size;
 	unsigned length;
 	int i;
@@ -510,7 +501,6 @@ int cons_options (inpacket, outpacket, l
 	struct data_string ds;
 	pair pp, *hash;
 	int need_endopt = 0;
-	int have_sso = 0;
 	int ocount = 0;
 	int ofbuf1=0, ofbuf2=0;
 
@@ -881,7 +871,6 @@ int store_options (ocount, buffer, bufle
 	    if ((option != NULL) &&
 		(((oc == NULL) && (option->format[0] == 'E')) ||
 		 ((oc != NULL) && (option->format[0] == 'e')))) {
-		int uix;
 		static char *s, *t;
 		struct option_cache *tmp;
 		struct data_string name;
@@ -1020,7 +1009,6 @@ int store_options (ocount, buffer, bufle
 	    toptstart = tix;
 	    while (length) {
 		    unsigned incr = length;
-		    int consumed = 0;
 		    int *pix;
 		    unsigned char *base;
 
@@ -1136,7 +1124,6 @@ format_has_text(format)
 	const char *format;
 {
 	const char *p;
-	int retval = 0;
 
 	p = format;
 	while (*p != '\0') {
@@ -2161,7 +2148,7 @@ store_option(struct data_string *result,
 						  "refers to unknown "
 						  "option space '%.*s'.",
 						  oc->option->code,
-						  end - start, start);
+						  (int) (end - start), start);
 					break;
 				}
 
@@ -2198,12 +2185,10 @@ int option_space_encapsulate (result, pa
 	struct binding_scope **scope;
 	struct data_string *name;
 {
-	struct data_string sub;
-	struct universe *u = NULL, *subu = NULL;
+	struct universe *u = NULL;
 	int status = 0;
-	int i;
 
-	universe_hash_lookup(&u, universe_hash, name->data, name->len, MDL);
+	universe_hash_lookup(&u, universe_hash, (char *)name->data, name->len, MDL);
 	if (u == NULL) {
 		log_error("option_space_encapsulate: option space %.*s does "
 			  "not exist, but is configured.",
@@ -2332,7 +2317,6 @@ int nwip_option_space_encapsulate (resul
 {
 	pair ocp;
 	int status;
-	int i;
 	static struct option_cache *no_nwip;
 	struct data_string ds;
 	struct option_chain_head *head;
@@ -2346,7 +2330,6 @@ int nwip_option_space_encapsulate (resul
 
 	status = 0;
 	for (ocp = head -> first; ocp; ocp = ocp -> cdr) {
-		struct option_cache *oc = (struct option_cache *)(ocp -> car);
 		if (store_option (result, universe, packet,
 				  lease, client_state, in_options,
 				  cfg_options, scope,
@@ -2539,7 +2522,6 @@ void suboption_foreach (struct packet *p
 {
 	struct universe *universe = find_option_universe (oc -> option,
 							  vsname);
-	int i;
 
 	if (universe -> foreach)
 		(*universe -> foreach) (packet, lease, client_state,
@@ -2589,7 +2571,6 @@ void save_linked_option (universe, optio
 	struct option_cache *oc;
 {
 	pair *tail;
-	pair np = (pair )0;
 	struct option_chain_head *head;
 
 	if (universe -> index >= options -> universe_count)
@@ -2764,7 +2745,6 @@ void do_packet (interface, packet, len, 
 	struct iaddr from;
 	struct hardware *hfrom;
 {
-	int i;
 	struct option_cache *op;
 	struct packet *decoded_packet;
 #if defined (DEBUG_MEMORY_LEAKAGE)
@@ -2942,7 +2922,6 @@ pretty_domain(char **dst, char *dend, co
 		return -1;
 
 	**dst = '"';
-	*dst++;
 
 	do {
 		/* Continue loop until end of src buffer. */
@@ -2951,7 +2930,6 @@ pretty_domain(char **dst, char *dend, co
 
 		/* Consume tag size. */
 		tsiz = **src;
-		*src++;
 
 		/* At root, finis. */
 		if (tsiz == 0)
@@ -2973,13 +2951,11 @@ pretty_domain(char **dst, char *dend, co
 			return -1;
 
 		**dst = '.';
-		*dst++;
 		count += status + 1;
 	}
 	while(1);
 
 	**dst = '"';
-	*dst++;
 
 	return count;
 }
diff -up dhcp-3.1.0/common/execute.c.warnings dhcp-3.1.0/common/execute.c
--- dhcp-3.1.0/common/execute.c.warnings	2007-05-11 11:51:07.000000000 -0400
+++ dhcp-3.1.0/common/execute.c	2007-10-23 14:33:17.000000000 -0400
@@ -54,8 +54,6 @@ int execute_statements (result, packet, 
 	struct executable_statement *r, *e, *next;
 	int rc;
 	int status;
-	unsigned long num;
-	struct binding_scope *outer;
 	struct binding *binding;
 	struct data_string ds;
 	struct binding_scope *ns;
@@ -363,7 +361,6 @@ int execute_statements (result, packet, 
 					binding -> next = (*scope) -> bindings;
 					(*scope) -> bindings = binding;
 				    } else {
-				       badalloc:
 					dfree (binding, MDL);
 					binding = (struct binding *)0;
 				    }
@@ -606,8 +603,6 @@ int executable_statement_dereference (pt
 	const char *file;
 	int line;
 {
-	struct executable_statement *bp;
-
 	if (!ptr || !*ptr) {
 		log_error ("%s(%d): null pointer", file, line);
 #if defined (POINTER_DEBUG)
@@ -739,8 +734,6 @@ void write_statements (file, statements,
 {
 	struct executable_statement *r, *x;
 	struct expression *expr;
-	int result;
-	int status;
 	const char *s, *t, *dot;
 	int col;
 
@@ -1014,10 +1007,8 @@ int find_matching_case (struct executabl
 {
 	int status, sub;
 	struct executable_statement *s;
-	unsigned long foo;
 
 	if (is_data_expression (expr)) {
-		struct executable_statement *e;
 		struct data_string cd, ds;
 		memset (&ds, 0, sizeof ds);
 		memset (&cd, 0, sizeof cd);
@@ -1091,7 +1082,6 @@ int executable_statement_foreach (struct
 {
 	struct executable_statement *foo;
 	int ok = 0;
-	int result;
 
 	for (foo = stmt; foo; foo = foo -> next) {
 	    if ((*callback) (foo, vp, condp) != 0)
diff -up dhcp-3.1.0/common/resolv.c.warnings dhcp-3.1.0/common/resolv.c
--- dhcp-3.1.0/common/resolv.c.warnings	2006-02-24 18:16:28.000000000 -0500
+++ dhcp-3.1.0/common/resolv.c	2007-10-23 14:33:17.000000000 -0400
@@ -50,10 +50,8 @@ void read_resolv_conf (parse_time)
 	struct parse *cfile;
 	const char *val;
 	int token;
-	int declaration = 0;
 	struct name_server *sp, *sl, *ns;
 	struct domain_search_list *dp, *dl, *nd;
-	struct iaddr *iaddr;
 
 	if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
 		log_error ("Can't open %s: %m", path_resolv_conf);
@@ -179,7 +177,6 @@ void read_resolv_conf (parse_time)
 
 struct name_server *first_name_server ()
 {
-	FILE *rc;
 	static TIME rcdate;
 	struct stat st;
 
@@ -190,8 +187,6 @@ struct name_server *first_name_server ()
 			return (struct name_server *)0;
 		}
 		if (st.st_mtime > rcdate) {
-			char rcbuf [512];
-			char *s, *t, *u;
 			rcdate = cur_time + 1;
 			
 			read_resolv_conf (rcdate);
diff -up dhcp-3.1.0/minires/res_init.c.warnings dhcp-3.1.0/minires/res_init.c
--- dhcp-3.1.0/minires/res_init.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/minires/res_init.c	2007-10-23 14:33:17.000000000 -0400
@@ -155,7 +155,7 @@ res_ninit(res_state statp) {
 int
 minires_vinit(res_state statp, int preinit) {
 	register FILE *fp;
-	register unsigned char *cp;
+	char *cp;
 	register char **pp;
 	register int n;
 	char buf[BUFSIZ];
diff -up dhcp-3.1.0/minires/res_query.c.warnings dhcp-3.1.0/minires/res_query.c
--- dhcp-3.1.0/minires/res_query.c.warnings	2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/minires/res_query.c	2007-10-23 14:33:17.000000000 -0400
@@ -384,7 +384,7 @@ res_nquerydomain(res_state statp,
 const char *
 res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
 	char *file;
-        unsigned char *cp1, *cp2;
+	char *cp1, *cp2;
 	char buf[BUFSIZ];
 	FILE *fp;
 
diff -up dhcp-3.1.0/minires/res_update.c.warnings dhcp-3.1.0/minires/res_update.c
--- dhcp-3.1.0/minires/res_update.c.warnings	2005-03-17 15:15:20.000000000 -0500
+++ dhcp-3.1.0/minires/res_update.c	2007-10-23 14:33:17.000000000 -0400
@@ -88,7 +88,7 @@ res_nupdate(res_state statp, ns_updrec *
 	double answer[PACKETSZ / sizeof (double)];
 	double packet[2*PACKETSZ / sizeof (double)];
 	struct zonegrp *zptr, tgrp;
-	int nzones = 0, nscount = 0;
+	int nscount = 0;
 	unsigned n;
 	unsigned rval;
 	struct sockaddr_in nsaddrs[MAXNS];
diff -up dhcp-3.1.0/minires/ns_date.c.warnings dhcp-3.1.0/minires/ns_date.c
--- dhcp-3.1.0/minires/ns_date.c.warnings	2007-05-29 13:49:44.000000000 -0400
+++ dhcp-3.1.0/minires/ns_date.c	2007-10-23 14:33:17.000000000 -0400
@@ -48,7 +48,7 @@ static const char rcsid[] = "$Id: ns_dat
 
 /* Forward. */
 
-static int	datepart(const unsigned char *, int, int, int, int *);
+static int	datepart(const char *, int, int, int, int *);
 
 /* Public. */
 
@@ -118,7 +118,7 @@ ns_datetosecs(const char *cp, int *errp)
  * Don't reset the flag if there is no error.
  */
 static int
-datepart(const unsigned char *buf, int size, int min, int max, int *errp) {
+datepart(const char *buf, int size, int min, int max, int *errp) {
 	int result = 0;
 	int i;
 
diff -up dhcp-3.1.0/minires/res_mkupdate.c.warnings dhcp-3.1.0/minires/res_mkupdate.c
--- dhcp-3.1.0/minires/res_mkupdate.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/minires/res_mkupdate.c	2007-10-23 14:33:17.000000000 -0400
@@ -112,7 +112,7 @@ res_nmkupdate(res_state statp,
 	u_int16_t rtype, rclass;
 	u_int32_t n1, rttl;
 	u_char *dnptrs[20], **dpp, **lastdnptr;
-	unsigned siglen, certlen;
+	unsigned certlen;
 	int keylen;
 	unsigned buflen = *blp;
 	u_char *buf = (unsigned char *)bp;
diff -up dhcp-3.1.0/client/clparse.c.warnings dhcp-3.1.0/client/clparse.c
--- dhcp-3.1.0/client/clparse.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/client/clparse.c	2007-10-23 14:33:17.000000000 -0400
@@ -39,8 +39,6 @@ static char copyright[] =
 
 #include "dhcpd.h"
 
-static TIME parsed_time;
-
 struct client_config top_level_config;
 
 u_int32_t default_requested_options [] = {
@@ -65,7 +63,6 @@ u_int32_t default_requested_options [] =
 isc_result_t read_client_conf ()
 {
 	struct client_config *config;
-	struct client_state *state;
 	struct interface_info *ip;
 	isc_result_t status;
 
@@ -245,11 +242,9 @@ void parse_client_statement (cfile, ip, 
 	int token;
 	const char *val;
 	struct option *option = NULL;
-	struct executable_statement *stmt, **p;
-	enum statement_op op;
+	struct executable_statement *stmt;
 	int lose;
 	char *name;
-	struct data_string key_id;
 	enum policy policy;
 	int known;
 	int tmp, i;
@@ -992,11 +987,9 @@ void parse_client_lease_declaration (cfi
 {
 	int token;
 	const char *val;
-	char *t, *n;
 	struct interface_info *ip;
 	struct option_cache *oc;
 	struct client_state *client = (struct client_state *)0;
-	struct data_string key_id;
 
 	switch (next_token (&val, (unsigned *)0, cfile)) {
 	      case KEY:
@@ -1212,12 +1205,6 @@ int parse_allow_deny (oc, cfile, flag)
 	struct parse *cfile;
 	int flag;
 {
-	enum dhcp_token token;
-	const char *val;
-	unsigned char rf = flag;
-	struct expression *data = (struct expression *)0;
-	int status;
-
 	parse_warn (cfile, "allow/deny/ignore not permitted here.");
 	skip_to_semi (cfile);
 	return 0;
diff -up dhcp-3.1.0/client/dhclient.c.warnings dhcp-3.1.0/client/dhclient.c
--- dhcp-3.1.0/client/dhclient.c.warnings	2007-10-23 14:33:17.000000000 -0400
+++ dhcp-3.1.0/client/dhclient.c	2007-10-23 14:33:17.000000000 -0400
@@ -126,7 +126,9 @@ int main (argc, argv, envp)
 #ifdef LIBDHCP
 	libdhcp_control = libdhcp_ctl;
 #endif
+#ifndef LIBDHCP
 	int fd;
+#endif
 	int i;
 	struct servent *ent;
 	struct interface_info *ip;
@@ -140,7 +142,6 @@ int main (argc, argv, envp)
 	omapi_object_t *listener;
 	isc_result_t result;
 	int persist = 0;
-	int omapi_port;
 	int no_dhclient_conf = 0;
 	int no_dhclient_db = 0;
 	int no_dhclient_pid = 0;
@@ -1171,7 +1172,6 @@ void state_selecting (cpp)
 			picked = lp;
 			picked -> next = (struct client_lease *)0;
 		} else {
-		      freeit:
 			destroy_client_lease (lp);
 		}
 	}
@@ -1230,7 +1230,6 @@ void dhcpack (packet)
 	struct client_lease *lease;
 	struct option_cache *oc;
 	struct data_string ds;
-	int i;
 	
 	/* If we're not receptive to an offer right now, or if the offer
 	   has an unrecognizable transaction id, then just drop it. */
@@ -1395,8 +1394,6 @@ void dhcpack (packet)
 void bind_lease (client)
 	struct client_state *client;
 {
-	struct interface_info *ip = client -> interface;
-
 	/* Remember the medium. */
 	client -> new -> medium = client -> medium;
 
@@ -1465,7 +1462,6 @@ void state_bound (cpp)
 	void *cpp;
 {
 	struct client_state *client = cpp;
-	int i;
 	struct option_cache *oc;
 	struct data_string ds;
 
@@ -1508,7 +1504,6 @@ void state_stop (cpp)
 	void *cpp;
 {
 	struct client_state *client = cpp;
-	int i;
 
 	/* Cancel all timeouts. */
 	cancel_timeout (state_selecting, client);
@@ -1643,8 +1638,6 @@ void dhcpoffer (packet)
 	int i;
 	int stop_selecting;
 	const char *name = packet -> packet_type ? "DHCPOFFER" : "BOOTREPLY";
-	struct iaddrlist *ap;
-	struct option_cache *oc;
 	char obuf [1024];
 	
 #ifdef DEBUG_PACKET
@@ -2493,7 +2486,6 @@ void make_discover (client, lease)
 	struct client_lease *lease;
 {
 	unsigned char discover = DHCPDISCOVER;
-	int i;
 	struct option_state *options = (struct option_state *)0;
 
 	memset (&client -> packet, 0, sizeof (client -> packet));
@@ -2558,9 +2550,6 @@ void make_request (client, lease)
 	struct client_lease *lease;
 {
 	unsigned char request = DHCPREQUEST;
-	int i, j;
-	unsigned char *tmp, *digest;
-	unsigned char *old_digest_loc;
 	struct option_cache *oc;
 
 	memset (&client -> packet, 0, sizeof (client -> packet));
@@ -2650,7 +2639,6 @@ void make_decline (client, lease)
 	struct client_lease *lease;
 {
 	unsigned char decline = DHCPDECLINE;
-	int i;
 	struct option_cache *oc;
 
 	struct option_state *options = (struct option_state *)0;
@@ -2707,7 +2695,6 @@ void make_release (client, lease)
 	struct client_lease *lease;
 {
 	unsigned char request = DHCPRELEASE;
-	int i;
 	struct option_cache *oc;
 
 	struct option_state *options = (struct option_state *)0;
@@ -2764,8 +2751,6 @@ void make_release (client, lease)
 void destroy_client_lease (lease)
 	struct client_lease *lease;
 {
-	int i;
-
 	if (lease -> server_name)
 		dfree (lease -> server_name, MDL);
 	if (lease -> filename)
@@ -2830,8 +2815,6 @@ void write_lease_option (struct option_c
 {
 	const char *name, *dot;
 	struct data_string ds;
-	int status;
-	struct client_state *client;
 
 	memset (&ds, 0, sizeof ds);
 
@@ -2860,11 +2843,8 @@ int write_client_lease (client, lease, r
 	int makesure;
 {
 	int i;
-	struct tm *t;
 	static int leases_written;
-	struct option_cache *oc;
 	struct data_string ds;
-	pair *hash;
 	int errors = 0;
 	char *s;
 	const char *tval;
@@ -3079,8 +3059,6 @@ void script_write_params (client, prefix
 	int i;
 	struct data_string data;
 	struct option_cache *oc;
-	pair *hash;
-	char *s, *t;
 	struct envadd_state es;
 
 	es.client = client;
@@ -3205,11 +3183,9 @@ int script_go (client)
 
 	return 0;
 #else
-	int rval;
 	char *scriptName;
 	char *argv [2];
 	char **envp;
-	char *epp [3];
 	char reason [] = "REASON=NBI";
 	static char client_path [] = CLIENT_PATH;
 	int i;
@@ -3291,7 +3267,7 @@ void client_envadd (struct client_state 
 {
 	char spbuf [1024];
 	char *s;
-	unsigned len, i;
+	unsigned len;
 	struct string_list *val;
 	va_list list;
 
@@ -3720,8 +3696,7 @@ void client_dns_update_timeout (void *cp
 
 isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
 {
-	struct data_string ddns_fqdn, ddns_fwd_name,
-	       ddns_dhcid, client_identifier;
+	struct data_string ddns_fwd_name, ddns_dhcid, client_identifier;
 	struct option_cache *oc;
 	int ignorep;
 	int result;