]> git.puffer.fish Git - matthieu/frr.git/commitdiff
There is no warnings here any more.
authorhasso <hasso>
Fri, 8 Oct 2004 06:36:38 +0000 (06:36 +0000)
committerhasso <hasso>
Fri, 8 Oct 2004 06:36:38 +0000 (06:36 +0000)
ripd/ChangeLog
ripd/rip_interface.c
ripd/rip_main.c
ripd/rip_routemap.c
ripd/rip_zebra.c
ripd/ripd.c

index 4ca580b9ea87fa6ce95cf7351b6efe41f146e28e..18b3c65e32fb0e0778e748ebb3e61bd4c9190df1 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-08 Hasso Tepper <hasso at quagga.net>
+
+       * *.c: Fix compiler warnings: make strings const, signed -> unsigned
+         etc.
+
 2004-09-26 Hasso Tepper <hasso at quagga.net>
 
        * ripd.c: Fix compiler warning.
index 7869f2e7edfb29a9074730cc8a8751b198de047a..cbb4d3e2495494d6e5b8fa1148131d1ba70dc0f6 100644 (file)
@@ -951,7 +951,7 @@ rip_enable_network_add (struct prefix *p)
       return -1;
     }
   else
-    node->info = "enabled";
+    node->info = (char *) "enabled";
 
   /* XXX: One should find a better solution than a generic one */
   rip_enable_apply_all();
@@ -988,7 +988,7 @@ rip_enable_network_delete (struct prefix *p)
 int
 rip_enable_if_lookup (char *ifname)
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (rip_enable_interface); i++)
@@ -1245,7 +1245,7 @@ rip_neighbor_delete (struct prefix_ipv4 *p)
 void
 rip_clean_network ()
 {
-  int i;
+  unsigned int i;
   char *str;
   struct route_node *rn;
 
@@ -1270,7 +1270,7 @@ rip_clean_network ()
 int
 rip_passive_nondefault_lookup (char *ifname)
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (Vrip_passive_nondefault); i++)
@@ -1344,7 +1344,7 @@ rip_passive_nondefault_unset (struct vty *vty, char *ifname)
 void
 rip_passive_nondefault_clean ()
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (Vrip_passive_nondefault); i++)
@@ -2114,7 +2114,7 @@ rip_interface_config_write (struct vty *vty)
 int
 config_write_rip_network (struct vty *vty, int config_mode)
 {
-  int i;
+  unsigned int i;
   char *ifname;
   struct route_node *node;
 
index c2128e4696c1cdbc63a92fccdbaf4fda3fa13b2d..bc251599e924db44c12078f714a5c8619522cff9 100644 (file)
@@ -92,7 +92,7 @@ int vty_port = RIP_VTY_PORT;
 struct thread_master *master;
 
 /* Process ID saved for use by init system */
-char *pid_file = PATH_RIPD_PID;
+const char *pid_file = PATH_RIPD_PID;
 
 /* Help information display. */
 static void
index 45a45f4b93abac8823e559719a7714be989adb29..ffe13170b522e9f5b6a9b388008c518828e16677 100644 (file)
@@ -47,7 +47,7 @@ struct rip_metric_modifier
 /* Add rip route map rule. */
 int
 rip_route_match_add (struct vty *vty, struct route_map_index *index,
-                    char *command, char *arg)
+                    const char *command, char *arg)
 {
   int ret;
 
@@ -70,7 +70,7 @@ rip_route_match_add (struct vty *vty, struct route_map_index *index,
 /* Delete rip route map rule. */
 int
 rip_route_match_delete (struct vty *vty, struct route_map_index *index,
-                       char *command, char *arg)
+                       const char *command, char *arg)
 {
   int ret;
 
@@ -93,7 +93,7 @@ rip_route_match_delete (struct vty *vty, struct route_map_index *index,
 /* Add rip route map rule. */
 int
 rip_route_set_add (struct vty *vty, struct route_map_index *index,
-                  char *command, char *arg)
+                  const char *command, char *arg)
 {
   int ret;
 
@@ -116,7 +116,7 @@ rip_route_set_add (struct vty *vty, struct route_map_index *index,
 /* Delete rip route map rule. */
 int
 rip_route_set_delete (struct vty *vty, struct route_map_index *index,
-                     char *command, char *arg)
+                     const char *command, char *arg)
 {
   int ret;
 
index 437e3c6420f1c6d88dff219a8af155831568005b..229fb33ae00db9c5f8b466b42c70599e3c2a5a12 100644 (file)
@@ -164,14 +164,14 @@ rip_routemap_set (int type, char *name)
 }
 
 void
-rip_redistribute_metric_set (int type, int metric)
+rip_redistribute_metric_set (int type, unsigned int metric)
 {
   rip->route_map[type].metric_config = 1;
   rip->route_map[type].metric = metric;
 }
 
 int
-rip_metric_unset (int type,int metric)
+rip_metric_unset (int type, unsigned int metric)
 {
 #define DONT_CARE_METRIC_RIP 17  
   if (metric != DONT_CARE_METRIC_RIP &&
@@ -201,7 +201,7 @@ rip_routemap_unset (int type,char *name)
 static struct {
   int type;
   int str_min_len;
-  char *str;
+  const char *str;
 } redist_type[] = {
   {ZEBRA_ROUTE_KERNEL,  1, "kernel"},
   {ZEBRA_ROUTE_CONNECT, 1, "connected"},
@@ -647,8 +647,8 @@ int
 config_write_rip_redistribute (struct vty *vty, int config_mode)
 {
   int i;
-  char *str[] = { "system", "kernel", "connected", "static", "rip",
-                 "ripng", "ospf", "ospf6", "isis", "bgp"};
+  const char *str[] = { "system", "kernel", "connected", "static", "rip",
+                       "ripng", "ospf", "ospf6", "isis", "bgp"};
 
   for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
     if (i != zclient->redist_default && zclient->redist[i])
index acf0e7d5ab89b947420e729cfdcbc7ed0fc3d08e..a7998860fba7f43b1750a9d5d47ad16a3c026686 100644 (file)
@@ -91,8 +91,8 @@ struct message rip_msg[] =
 struct
 {  
   int key;
-  char *str;
-  char *str_long;
+  const char *str;
+  const char *str_long;
 } route_info[] =
 {
   { ZEBRA_ROUTE_SYSTEM,  "X", "system"},
@@ -103,6 +103,7 @@ struct
   { ZEBRA_ROUTE_RIPNG,   "R", "ripng"},
   { ZEBRA_ROUTE_OSPF,    "O", "ospf"},
   { ZEBRA_ROUTE_OSPF6,   "O", "ospf6"},
+  { ZEBRA_ROUTE_ISIS,    "I", "isis"},
   { ZEBRA_ROUTE_BGP,     "B", "bgp"}
 };
 \f
@@ -678,11 +679,11 @@ rip_rte_process (struct rte *rte, struct sockaddr_in *from,
 
 /* Dump RIP packet */
 void
-rip_packet_dump (struct rip_packet *packet, int size, char *sndrcv)
+rip_packet_dump (struct rip_packet *packet, int size, const char *sndrcv)
 {
   caddr_t lim;
   struct rte *rte;
-  char *command_str;
+  const char *command_str;
   char pbuf[BUFSIZ], nbuf[BUFSIZ];
   u_char netmask = 0;
   u_char *p;
@@ -2910,7 +2911,7 @@ DEFUN (rip_route,
       return CMD_WARNING;
     }
 
-  node->info = "static";
+  node->info = (char *)"static";
 
   rip_redistribute_add (ZEBRA_ROUTE_RIP, RIP_ROUTE_STATIC, &p, 0, NULL);
 
@@ -3379,7 +3380,7 @@ rip_vty_out_uptime (struct vty *vty, struct rip_info *rinfo)
     }
 }
 
-char *
+const char *
 rip_route_type_print (int sub_type)
 {
   switch (sub_type)
@@ -3490,8 +3491,8 @@ DEFUN (show_ip_rip_status,
   struct interface *ifp;
   struct rip_interface *ri;
   extern struct message ri_version_msg[];
-  char *send_version;
-  char *receive_version;
+  const char *send_version;
+  const char *receive_version;
 
   if (! rip)
     return CMD_SUCCESS;