]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd: fix compiler warnings
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 10 Dec 2009 16:16:05 +0000 (19:16 +0300)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 10 Dec 2009 16:16:05 +0000 (19:16 +0300)
* ripd/rip_interface.c
  * rip_request_neighbor(): comment out, unused
  * rip_request_neighbor_all(): idem
  * rip_interface_up(): Cast flags otherwise compiler complains
    about %lld not matching uint64_t on 64 bit x86. Print in hex
    since flags are bit field.
  * rip_interface_add(): idem
  * rip_interface_delete(): idem
* ripd/rip_zebra.c
  * rip_redistribute_set(): comment out, unused
* ripd/ripd.h
  * rip_redistribute_check(): move prototype here so compiler
    can check function against prototype
* ripd/ripd.c
  * rip_update_default_metric(): comment out, unused

ripd/rip_interface.c
ripd/rip_zebra.c
ripd/ripd.c
ripd/ripd.h

index 4f80bf42ead47d78d211788855aed518997db541..d3b55fc01f52a0ca0a0ef197382d5a643104c96b 100644 (file)
@@ -239,6 +239,7 @@ rip_request_interface (struct interface *ifp)
   }
 }
 
+#if 0
 /* Send RIP request to the neighbor. */
 static void
 rip_request_neighbor (struct in_addr addr)
@@ -269,6 +270,7 @@ rip_request_neighbor_all (void)
     if (rp->info)
       rip_request_neighbor (rp->p.u.prefix4);
 }
+#endif
 
 /* Multicast packet receive socket. */
 static int
@@ -423,8 +425,9 @@ rip_interface_up (int command, struct zclient *zclient, zebra_size_t length)
     return 0;
 
   if (IS_RIP_DEBUG_ZEBRA)
-    zlog_debug ("interface %s index %d flags %lld metric %d mtu %d is up",
-              ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+    zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is up",
+              ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+              ifp->metric, ifp->mtu);
 
   /* Check if this interface is RIP enabled or not.*/
   rip_enable_apply (ifp);
@@ -447,8 +450,9 @@ rip_interface_add (int command, struct zclient *zclient, zebra_size_t length)
   ifp = zebra_interface_add_read (zclient->ibuf);
 
   if (IS_RIP_DEBUG_ZEBRA)
-    zlog_debug ("interface add %s index %d flags %lld metric %d mtu %d",
-              ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+    zlog_debug ("interface add %s index %d flags %#llx metric %d mtu %d",
+               ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+               ifp->metric, ifp->mtu);
 
   /* Check if this interface is RIP enabled or not.*/
   rip_enable_apply (ifp);
@@ -486,8 +490,9 @@ rip_interface_delete (int command, struct zclient *zclient,
     rip_if_down(ifp);
   } 
   
-  zlog_info("interface delete %s index %d flags %lld metric %d mtu %d",
-           ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);  
+  zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d",
+           ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+           ifp->metric, ifp->mtu);
   
   /* To support pseudo interface do not free interface structure.  */
   /* if_delete(ifp); */
@@ -947,8 +952,6 @@ rip_interface_wakeup (struct thread *t)
   return 0;
 }
 
-int rip_redistribute_check (int);
-
 static void
 rip_connect_set (struct interface *ifp, int set)
 {
index 7729d9b472679e7261cc51df362627ef4b4853e1..c476d8f489fa8966aceed3b65dc8c54a3ec05804 100644 (file)
@@ -233,6 +233,7 @@ DEFUN (no_router_zebra,
   return CMD_SUCCESS;
 }
 
+#if 0
 static int
 rip_redistribute_set (int type)
 {
@@ -246,6 +247,7 @@ rip_redistribute_set (int type)
 
   return CMD_SUCCESS;
 }
+#endif
 
 static int
 rip_redistribute_unset (int type)
index 2d5a85600aabd74fe90995935c278a4725aad2e7..5a6dbc8c9a24b3ccb8152e7bf4ca0bbdc22387f5 100644 (file)
@@ -2976,6 +2976,7 @@ DEFUN (no_rip_route,
   return CMD_SUCCESS;
 }
 
+#if 0
 static void
 rip_update_default_metric (void)
 {
@@ -2987,6 +2988,7 @@ rip_update_default_metric (void)
       if (rinfo->type != ZEBRA_ROUTE_RIP && rinfo->type != ZEBRA_ROUTE_CONNECT)
         rinfo->metric = rip->default_metric;
 }
+#endif
 
 DEFUN (rip_default_metric,
        rip_default_metric_cmd,
index 4d0c04e2f846329ba807b9411862e2b9ac976aba..45b07b9cb6b486c0603eb90f893d3416b415b55e 100644 (file)
@@ -395,6 +395,8 @@ extern int if_check_address (struct in_addr addr);
 extern int rip_request_send (struct sockaddr_in *, struct interface *, u_char,
                       struct connected *);
 extern int rip_neighbor_lookup (struct sockaddr_in *);
+
+extern int rip_redistribute_check (int);
 extern void rip_redistribute_add (int, int, struct prefix_ipv4 *, unsigned int, 
                           struct in_addr *, unsigned int, unsigned char);
 extern void rip_redistribute_delete (int, int, struct prefix_ipv4 *, unsigned int);