]> git.puffer.fish Git - mirror/frr.git/commitdiff
Only warning left is the known lvalue problem in ripng_nexthop.c.
authorhasso <hasso>
Fri, 8 Oct 2004 06:32:23 +0000 (06:32 +0000)
committerhasso <hasso>
Fri, 8 Oct 2004 06:32:23 +0000 (06:32 +0000)
ripngd/ChangeLog
ripngd/ripng_interface.c
ripngd/ripng_main.c
ripngd/ripng_routemap.c
ripngd/ripng_zebra.c
ripngd/ripngd.c
ripngd/ripngd.h

index 112aa192188e3684ccb4a383803e4305743df410..8fb577b6c5cdd31ff9af959774c65370620e209b 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-08 Hasso Tepper <hasso at quagga.net>
+
+       * *.[c|h]: Fix compiler warnings: make strings const, signed ->
+         unsigned etc.
+
 2004-09-26 Hasso Tepper <hasso at quagga.net>
 
        * ripingd.c: Access list hook argument function must have struct
index 126829f68bb56c9835e37fb0e9c550c4d74adbec..eb9005c37a9e13e3de6191af657d1e9b37af1574 100644 (file)
@@ -604,7 +604,7 @@ ripng_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 */
   ripng_enable_apply_all();
@@ -638,7 +638,7 @@ ripng_enable_network_delete (struct prefix *p)
 int
 ripng_enable_if_lookup (char *ifname)
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (ripng_enable_if); i++)
@@ -836,7 +836,7 @@ ripng_enable_apply_all ()
 void
 ripng_clean_network ()
 {
-  int i;
+  unsigned int i;
   char *str;
   struct route_node *rn;
 
@@ -862,7 +862,7 @@ vector Vripng_passive_interface;
 int
 ripng_passive_interface_lookup (char *ifname)
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (Vripng_passive_interface); i++)
@@ -937,7 +937,7 @@ ripng_passive_interface_unset (struct vty *vty, char *ifname)
 void
 ripng_passive_interface_clean (void)
 {
-  int i;
+  unsigned int i;
   char *str;
 
   for (i = 0; i < vector_max (Vripng_passive_interface); i++)
@@ -953,7 +953,7 @@ ripng_passive_interface_clean (void)
 int
 ripng_network_write (struct vty *vty, int config_mode)
 {
-  int i;
+  unsigned int i;
   char *ifname;
   struct route_node *node;
   char buf[BUFSIZ];
index 921937882922f62edaa5c5289b6f8687a0d8f3b3..40d2b146479146c241241b43b73529e0c15735cd 100644 (file)
@@ -96,7 +96,7 @@ int vty_port = RIPNG_VTY_PORT;
 struct thread_master *master;
 
 /* Process ID saved for use by init system */
-char *pid_file = PATH_RIPNGD_PID;
+const char *pid_file = PATH_RIPNGD_PID;
 
 /* Help information display. */
 static void
index 0bd7e4482cd073be21e9302afc48ded91a742653..a31830106fa6005f98328628771de52ac1ac2a7a 100644 (file)
@@ -45,7 +45,7 @@ struct rip_metric_modifier
 \f
 int
 ripng_route_match_add (struct vty *vty, struct route_map_index *index,
-                      char *command, char *arg)
+                      const char *command, char *arg)
 {
   int ret;
 
@@ -69,7 +69,7 @@ ripng_route_match_add (struct vty *vty, struct route_map_index *index,
 
 int
 ripng_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 @@ ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
 
 int
 ripng_route_set_add (struct vty *vty, struct route_map_index *index,
-                    char *command, char *arg)
+                    const char *command, char *arg)
 {
   int ret;
 
@@ -117,7 +117,7 @@ ripng_route_set_add (struct vty *vty, struct route_map_index *index,
 
 int
 ripng_route_set_delete (struct vty *vty, struct route_map_index *index,
-                       char *command, char *arg)
+                       const char *command, char *arg)
 {
   int ret;
 
index 45ba21308e96fb6461fd36f336b0a2ed8f670412..7aaa3537e11b811b1da8a49bc4ff153eb8bea08d 100644 (file)
@@ -207,7 +207,7 @@ ripng_redistribute_routemap_unset (int type)
 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"},
@@ -484,8 +484,8 @@ void
 ripng_redistribute_write (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 4d7c0216e4f731384a1027e63dd6d599d605e5af..a7254bc143790dee16fd80d251089e6a140b4c57 100644 (file)
@@ -296,11 +296,11 @@ ripng_recv_packet (int sock, u_char *buf, int bufsize,
 
 /* Dump rip packet */
 void
-ripng_packet_dump (struct ripng_packet *packet, int size, char *sndrcv)
+ripng_packet_dump (struct ripng_packet *packet, int size, const char *sndrcv)
 {
   caddr_t lim;
   struct rte *rte;
-  char *command_str;
+  const char *command_str;
 
   /* Set command string. */
   if (packet->command == RIPNG_REQUEST)
@@ -1935,12 +1935,13 @@ ripng_event (enum ripng_event event, int sock)
     }
 }
 \f
-/* Each route type's strings and default preference. */
+/* Each route type's strings and default preference.
+ * FIXME: ISIS? What are these distance values? */
 struct
 {  
   int key;
-  char *str;
-  char *str_long;
+  const char *str;
+  const char *str_long;
   int distance;
 } route_info[] =
 {
index 609e6925a594d853adb53ffeebfd40cb74743e76..bf69af443ebf8b2849c215adfd4e4fe2e433c833 100644 (file)
@@ -395,7 +395,7 @@ int ripng_write_rte (int num, struct stream *s, struct prefix_ipv6 *p,
 int ripng_send_packet (caddr_t buf, int bufsize, struct sockaddr_in6 *to, 
                       struct interface *ifp);
 
-void ripng_packet_dump (struct ripng_packet *packet, int size, char *sndrcv);
+void ripng_packet_dump (struct ripng_packet *packet, int size, const char *sndrcv);
 
 
 #endif /* _ZEBRA_RIPNG_RIPNGD_H */