diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 53ae8f2..8423cab 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-26 Hasso Tepper <hasso at quagga.net>
+
+	* ospf_abr.c, ospf_dump.c, ospf_lsa.c, ospf_packet.c, ospf_vty.c,
+	  ospf_zebra.c: Fix compiler warnings.
+
 2004-09-24 Paul Jakma <paul@dishone.st>
 
         * ospf_apiserver.{c,h}: lists typedef removal cleanup.
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 9f3a587..e23ace2 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -596,7 +596,7 @@
   struct summary_lsa *header;
   u_char *mp;
   metric = htonl (metric);
-  mp = (char *) &metric;
+  mp = (u_char *) &metric;
   mp++;
   header = (struct summary_lsa *) lsa->data;
   memcpy(header->metric, mp, 3);
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 3711e9f..958baa4 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -649,7 +649,7 @@
       break;
     case OSPF_AUTH_SIMPLE:
       memset (buf, 0, 9);
-      strncpy (buf, ospfh->u.auth_data, 8);
+      strncpy (buf, (char *) ospfh->u.auth_data, 8);
       zlog_info ("  Simple Password %s", buf);
       break;
     case OSPF_AUTH_CRYPTOGRAPHIC:
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 34d71b6..944af64 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -186,7 +186,7 @@
 
   lsa->checksum = 0;
   length = ntohs (lsa->length) - 2;
-  sp = (char *) &lsa->options;
+  sp = (u_char *) &lsa->options;
 
   for (ep = sp + length; sp < ep; sp = q)
     {
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 5952d18..67926fc 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -351,7 +351,7 @@
   else
     {
       ck = getdata (OSPF_IF_PARAM (oi, auth_crypt)->tail);
-      auth_key = ck->auth_key;
+      auth_key = (char *) ck->auth_key;
     }
 
   /* Generate a digest for the entire packet + our secret key. */
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 6b0dabb..ab73f7b 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -718,7 +718,7 @@
   if (vl_config->auth_key)
     {
       memset(IF_DEF_PARAMS (ifp)->auth_simple, 0, OSPF_AUTH_SIMPLE_SIZE+1);
-      strncpy (IF_DEF_PARAMS (ifp)->auth_simple, vl_config->auth_key, 
+      strncpy ((char *) IF_DEF_PARAMS (ifp)->auth_simple, vl_config->auth_key, 
 	       OSPF_AUTH_SIMPLE_SIZE);
     }
   else if (vl_config->md5_key)
@@ -733,7 +733,7 @@
       ck = ospf_crypt_key_new ();
       ck->key_id = vl_config->crypto_key_id;
       memset(ck->auth_key, 0, OSPF_AUTH_MD5_SIZE+1);
-      strncpy (ck->auth_key, vl_config->md5_key, OSPF_AUTH_MD5_SIZE);
+      strncpy ((char *) ck->auth_key, vl_config->md5_key, OSPF_AUTH_MD5_SIZE);
       
       ospf_crypt_key_add (IF_DEF_PARAMS (ifp)->auth_crypt, ck);
     }
@@ -4130,7 +4130,7 @@
 
 
   memset (params->auth_simple, 0, OSPF_AUTH_SIMPLE_SIZE + 1);
-  strncpy (params->auth_simple, argv[0], OSPF_AUTH_SIMPLE_SIZE);
+  strncpy ((char *) params->auth_simple, argv[0], OSPF_AUTH_SIMPLE_SIZE);
   SET_IF_PARAM (params, auth_simple);
 
   return CMD_SUCCESS;
@@ -4255,7 +4255,7 @@
   ck = ospf_crypt_key_new ();
   ck->key_id = (u_char) key_id;
   memset (ck->auth_key, 0, OSPF_AUTH_MD5_SIZE+1);
-  strncpy (ck->auth_key, argv[1], OSPF_AUTH_MD5_SIZE);
+  strncpy ((char *) ck->auth_key, argv[1], OSPF_AUTH_MD5_SIZE);
 
   ospf_crypt_key_add (params->auth_crypt, ck);
   SET_IF_PARAM (params, auth_crypt);
@@ -6882,9 +6882,9 @@
 
 	/* Create Area ID string by specified Area ID format. */
 	if (n->format == OSPF_AREA_ID_FORMAT_ADDRESS)
-	  strncpy (buf, inet_ntoa (n->area_id), INET_ADDRSTRLEN);
+	  strncpy ((char *) buf, inet_ntoa (n->area_id), INET_ADDRSTRLEN);
 	else
-	  sprintf (buf, "%lu", 
+	  sprintf ((char *) buf, "%lu", 
 		   (unsigned long int) ntohl (n->area_id.s_addr));
 
 	/* Network print. */
@@ -6908,7 +6908,7 @@
       struct ospf_area *area = getdata (node);
       struct route_node *rn1;
 
-      area_id2str (buf, INET_ADDRSTRLEN, area);
+      area_id2str ((char *) buf, INET_ADDRSTRLEN, area);
 
       if (area->auth_type != OSPF_AUTH_NULL)
 	{
@@ -7041,9 +7041,9 @@
 	  memset (buf, 0, INET_ADDRSTRLEN);
 	  
 	  if (vl_data->format == OSPF_AREA_ID_FORMAT_ADDRESS)
-	    strncpy (buf, inet_ntoa (vl_data->vl_area_id), INET_ADDRSTRLEN);
+	    strncpy ((char *) buf, inet_ntoa (vl_data->vl_area_id), INET_ADDRSTRLEN);
 	  else
-	    sprintf (buf, "%lu", 
+	    sprintf ((char *) buf, "%lu", 
 		     (unsigned long int) ntohl (vl_data->vl_area_id.s_addr));
 	  oi = vl_data->vl_oi;
 
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 5520c08..6a675a5 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -139,7 +139,7 @@
   stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
 
   /* Lookup this by interface index. */
-  ifp = if_lookup_by_name (ifname_tmp);
+  ifp = if_lookup_by_name ((char *) ifname_tmp);
 
   /* If such interface does not exist, indicate an error */
   if (!ifp)
