]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Removed a lot of unused variables.
authorMartin Mares <mj@ucw.cz>
Thu, 4 May 2000 20:30:36 +0000 (20:30 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 4 May 2000 20:30:36 +0000 (20:30 +0000)
Please try compiling your code with --enable-warnings to see them. (The
unused parameter warnings are usually bogus, the unused variable ones
are very useful, but gcc is unable to control them separately.)

lib/ipv4.c
nest/a-path.c
nest/iface.c
nest/proto.c
nest/rt-table.c
proto/bgp/packets.c
sysdep/linux/netlink/netlink.c
sysdep/unix/io.c
sysdep/unix/krt.c

index db3b54aa91643b6147b0189afde854d8308fa2cf..8488a2860b2b50f3c3f6afc921962a7107cbe459 100644 (file)
@@ -72,7 +72,7 @@ ipv4_class_mask(u32 a)
 int
 ip_pton(char *a, ip_addr *o)
 {
-  int i,j;
+  int i;
   unsigned long int l;
   u32 ia = 0;
 
index 354152219e304ff05e611f40db7316fd71af0d15..0ea3e7b2c4897e53a29ae79b022727613100083d 100644 (file)
@@ -47,7 +47,7 @@ as_path_format(struct adata *path, byte *buf, unsigned int size)
   byte *e = p + path->length;
   byte *end = buf + size - 8;
   int sp = 1;
-  int l, type, isset, as;
+  int l, isset;
 
   while (p < e)
     {
index d41b39daea17ca4448af547c96aacb9cce019e03..c585a531eb203cbaa5300815c61646569f16f9f2 100644 (file)
@@ -202,7 +202,6 @@ struct iface *
 if_update(struct iface *new)
 {
   struct iface *i;
-  struct ifa *a, *b;
   unsigned c;
 
   WALK_LIST(i, iface_list)
@@ -263,7 +262,7 @@ if_end_partial_update(struct iface *i)
 void
 if_end_update(void)
 {
-  struct iface *i, j;
+  struct iface *i;
   struct ifa *a, *b;
 
   if (!config->router_id)
index 1af76eae8151e164dc68b472bd13cdda77e97852..7b9821af412473b748cbfa70a9476b1003ee82d7 100644 (file)
@@ -460,7 +460,6 @@ proto_notify_state(struct proto *p, unsigned ps)
        }
       break;
     default:
-    error:
       bug("Invalid state transition for %s from %s/%s to */%s", p->name, c_states[cs], p_states[ops], p_states[ps]);
     }
   p->proto_state = ps;
index 0c4c9e733313b072d0866a4030a5b8afd45e6d38..832e9ef4a722cb109fe2485b1117ea6aa5d29f98 100644 (file)
@@ -747,7 +747,6 @@ rt_show_cleanup(struct cli *c)
 void
 rt_show(struct rt_show_data *d)
 {
-  struct rtable_config *tc;
   net *n;
 
   if (d->pxlen == 256)
index e9ba050b6ad2bcef35661c2bf1c785170a81560f..d6c2169fbe08c7d228cd3774ababb514d9433873 100644 (file)
@@ -77,7 +77,6 @@ bgp_create_update(struct bgp_conn *conn, byte *buf)
   struct bgp_bucket *buck;
   int remains = BGP_MAX_PACKET_LENGTH - BGP_HEADER_LENGTH - 4;
   byte *w;
-  ip_addr ip;
   int wd_size = 0;
   int r_size = 0;
   int a_size = 0;
@@ -717,8 +716,6 @@ bgp_log_error(struct bgp_proto *p, char *msg, unsigned code, unsigned subcode, b
 static void
 bgp_rx_notification(struct bgp_conn *conn, byte *pkt, int len)
 {
-  unsigned arg;
-
   if (len < 21)
     {
       bgp_error(conn, 1, 2, pkt+16, 2);
index 86f13f0b623e78259ac22bfe58eca6047911efa0..bafa2e91068b3fee8019cce7ecbb556e4d2ed1a5 100644 (file)
@@ -463,7 +463,6 @@ nl_send_route(struct krt_proto *p, rte *e, int new)
     struct rtmsg r;
     char buf[128];
   } r;
-  struct nlmsghdr *reply;
 
   DBG("nl_send_route(%I/%d,new=%d)\n", net->n.prefix, net->n.pxlen, new);
 
index 895f5373fc988f01a0b8c497abf3f124ea46da1d..996b97157718e57fa21d20bb4af25571ef2115b0 100644 (file)
@@ -521,7 +521,7 @@ sk_passive_connected(sock *s, struct sockaddr *sa, int al, int type)
 int
 sk_open(sock *s)
 {
-  int fd, e;
+  int fd;
   sockaddr sa;
   int one = 1;
   int type = s->type;
index 803077f03858a10aeeeb1cd23b6da56f10be84ed..6ef8d9068ab07c569593b2e2b55c0c2199de1075 100644 (file)
@@ -544,9 +544,7 @@ sentenced:
 static void
 krt_prune(struct krt_proto *p)
 {
-  struct proto *pp = &p->p;
   struct rtable *t = p->p.table;
-  struct fib_node *f;
 
   KRT_TRACE(p, D_EVENTS, "Pruning table %s", t->name);
   FIB_WALK(&t->fib, f)
@@ -605,7 +603,6 @@ void
 krt_got_route_async(struct krt_proto *p, rte *e, int new)
 {
   net *net = e->net;
-  rte *old = net->routes;
   int src = e->u.krt.src;
 
   switch (src)