]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
... and a whole bunch of unused parameters and variables in ospf.
authorMartin Mares <mj@ucw.cz>
Sat, 5 Jun 2004 09:28:17 +0000 (09:28 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 5 Jun 2004 09:28:17 +0000 (09:28 +0000)
proto/ospf/dbdes.c
proto/ospf/hello.c
proto/ospf/iface.c
proto/ospf/lsack.c
proto/ospf/lsalib.c
proto/ospf/lsupd.c
proto/ospf/neighbor.c
proto/ospf/ospf.c
proto/ospf/packet.c
proto/ospf/rt.c
proto/ospf/topology.c

index cbab8382ba70ea32eb9efc30feaeb845d4013027..aa9df7392b8d4e366389ebd120adab84f7c56ed6 100644 (file)
@@ -154,7 +154,6 @@ ospf_dbdes_reqladd(struct ospf_dbdes_packet *ps, struct ospf_neighbor *n)
   struct top_hash_entry *he, *sn;
   struct top_graph *gr = n->ifa->oa->gr;
   struct ospf_packet *op;
-  struct proto *p = (struct proto *) n->ifa->proto;
   int i, j;
 
   op = (struct ospf_packet *) ps;
index 6837858636cc905cf85176b3c64d727235463533..f09860f14b9da06263599b3571363a3a5a0aca29 100644 (file)
@@ -13,13 +13,12 @@ ospf_hello_receive(struct ospf_hello_packet *ps,
                   struct ospf_iface *ifa, int size, ip_addr faddr)
 {
   u32 nrid, *pnrid;
-  struct ospf_neighbor *neigh, *n;
+  struct ospf_neighbor *n;
   u8 i, twoway, oldpriority;
   ip_addr olddr, oldbdr;
   ip_addr mask;
   char *beg = "Bad OSPF hello packet from ", *rec = " received: ";
   int eligible = 0;
-  pool *pool;
   struct proto *p = (struct proto *) ifa->proto;
 
   nrid = ntohl(((struct ospf_packet *) ps)->routerid);
index dffb357af4512960c03484fb155210d1268c07c6..70e73b935278f06fc523a2380d0e976bbec1d113 100644 (file)
@@ -116,7 +116,6 @@ downint(struct ospf_iface *ifa)
 {
   struct ospf_neighbor *n,*nx;
   struct proto *p=&ifa->proto->proto;
-  struct proto_ospf *po=ifa->proto;
 
   WALK_LIST_DELSAFE(n,nx,ifa->neigh_list)
   {
@@ -149,7 +148,6 @@ void
 ospf_int_sm(struct ospf_iface *ifa, int event)
 {
   struct proto *p=(struct proto *)(ifa->proto);
-  struct proto_ospf *po=ifa->proto;
   struct ospf_area *oa=ifa->oa;
 
   OSPF_TRACE(D_EVENTS, "SM on iface %s. Event is \"%s\".",
@@ -324,9 +322,6 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *iface)
   struct ospf_iface *ifa;
   struct object_lock *lock;
   struct nbma_node *nbma,*nb;
-  u8 i;
-  sock *mcsk;
-
 
   DBG("%s: If notify called\n", p->name);
   if (iface->flags & IF_IGNORE)
@@ -457,7 +452,6 @@ ospf_if_notify(struct proto *p, unsigned flags, struct iface *iface)
 void
 ospf_iface_info(struct ospf_iface *ifa)
 {
-  int x;
   char *strict="(strict)";
 
   if((ifa->type!=OSPF_IT_NBMA)||(ifa->strictnbma==0)) strict="";
index cb27ec835e980bf1a40b96fce4af41a10f3fd309..71306f15f97f831736fd72452247a4d9804f30eb 100644 (file)
@@ -124,7 +124,6 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps,
   u32 nrid, myrid;
   struct ospf_neighbor *n;
   struct ospf_lsa_header lsa, *plsa;
-  int length;
   u16 nolsa, i;
   struct top_hash_entry *en;
   u16 lenn = ntohs(ps->ospf_packet.length);
index 82a5938ba69f5b9421505585aaa8b304b96692ea..394301d627e01e5696d2239a09793861f4fb8cd0 100644 (file)
@@ -421,7 +421,6 @@ struct top_hash_entry *
 lsa_install_new(struct ospf_lsa_header *lsa, void *body, struct ospf_area *oa)
 {
   /* LSA can be temporarrily, but body must be mb_allocated. */
-  struct proto *p=&oa->po->proto;
   int change=0;
   unsigned i;
   struct top_hash_entry *en;
index 8c82588bb22ff5d17193c8dae49630bd45a719b1..2cc0654dffcf599c9551493293b30615a7104223 100644 (file)
@@ -147,7 +147,6 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
 
     {
       sock *sk;
-      ip_addr to;
       u16 len, age;
       struct ospf_lsupd_packet *pk;
       struct ospf_packet *op;
@@ -226,8 +225,6 @@ ospf_lsupd_send_list(struct ospf_neighbor *n, list * l)
   struct ospf_packet *op;
   struct proto *p = &n->ifa->oa->po->proto;
   void *pktpos;
-  u8 ii;
-  u8 *jj = n->ifa->ip_sk->tbuf;
 
   if (EMPTY_LIST(*l))
     return;
@@ -294,7 +291,6 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
   struct ospf_area *oa;
   struct proto_ospf *po = ifa->proto;
   struct proto *p = (struct proto *) po;
-  u16 length;
   u8 i;
   int sendreq = 1;
 
index 44c8e4b0d7fa89ac9dac3c245f6aaf37ac0316d5..1ccc2765dacbc773eea8552d4a63171df883a85c 100644 (file)
@@ -375,7 +375,7 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
 void
 bdr_election(struct ospf_iface *ifa)
 {
-  struct ospf_neighbor *neigh,*ndr,*nbdr,me,*tmp;
+  struct ospf_neighbor *neigh,*ndr,*nbdr,me;
   u32 myid;
   ip_addr ndrip, nbdrip;
   int doadj;
@@ -570,7 +570,6 @@ rxmt_timer_hook(timer *timer)
 {
   struct ospf_neighbor *n = (struct ospf_neighbor *)timer->data;
   struct ospf_iface *ifa = n->ifa;
-  struct proto *p = (struct proto *)(ifa->proto);
   struct top_hash_entry *en;
 
   DBG("%s: RXMT timer fired on interface %s for neigh: %I.\n",
index 53ad210a3bb920ccba41ff3c1a28102bdfe2b03d..7603dac4a50bf69320e6f8521d5f10a8ed506930 100644 (file)
@@ -129,10 +129,8 @@ ospf_start(struct proto *p)
 static void
 ospf_dump(struct proto *p)
 {
-  char areastr[20];
   struct ospf_iface *ifa;
   struct ospf_neighbor *n;
-  struct ospf_config *c = (void *) p->cf;
   struct proto_ospf *po=(struct proto_ospf *)p;
   struct ospf_area *oa;
 
@@ -165,8 +163,6 @@ ospf_init(struct proto_config *c)
   struct proto *p = proto_new(c, sizeof(struct proto_ospf));
   struct proto_ospf *po=(struct proto_ospf *)p;
   struct ospf_config *oc=(struct ospf_config *)c;
-  struct ospf_area_config *ac;
-  struct ospf_iface_patt *patt;
 
   p->import_control = ospf_import_control;
   p->make_tmp_attrs = ospf_make_tmp_attrs;
@@ -185,8 +181,6 @@ ospf_init(struct proto_config *c)
 static int
 ospf_rte_better(struct rte *new, struct rte *old)
 {
-  struct proto *p = new->attrs->proto;
-
   if(new->u.ospf.metric1==LSINFINITY) return 0;
 
   /* External paths are always longer that internal */
@@ -288,7 +282,7 @@ void
 area_disp(timer *timer)
 {
   struct ospf_area *oa=timer->data;
-  struct top_hash_entry *en,*nxt;
+  struct top_hash_entry *nxt;
   struct proto_ospf *po=oa->po;
   struct ospf_iface *ifa;
 
@@ -324,7 +318,6 @@ int
 ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool *pool)
 {
   rte *e=*new;
-  struct proto_ospf *po=(struct proto_ospf *)p;
 
   if(p==e->attrs->proto) return -1;    /* Reject our own routes */
   *attrs = ospf_build_attrs(*attrs, pool, LSINFINITY, 10000, 0);
@@ -360,8 +353,6 @@ ospf_shutdown(struct proto *p)
 {
   struct proto_ospf *po=(struct proto_ospf *)p;
   struct ospf_iface *ifa;
-  struct ospf_neighbor *n;
-  struct ospf_area *oa;
   OSPF_TRACE(D_EVENTS, "Shutdown requested");
 
   /* And send to all my neighbors 1WAY */
@@ -372,7 +363,7 @@ ospf_shutdown(struct proto *p)
 }
 
 void
-ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs)
+ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old UNUSED, ea_list *attrs)
 {
   struct proto_ospf *po=(struct proto_ospf *)p;
 
@@ -436,7 +427,7 @@ ospf_get_status(struct proto *p, byte *buf)
 }
 
 static void
-ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs)
+ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs UNUSED)
 {
   char met=' ';
   char type=' ';
@@ -851,13 +842,8 @@ ospf_sh(struct proto *p)
 void
 ospf_sh_iface(struct proto *p, char *iff)
 {
-  struct ospf_area *oa;
   struct proto_ospf *po=(struct proto_ospf *)p;
   struct ospf_iface *ifa=NULL,*f;
-  struct ospf_neighbor *n;
-  int ifano;
-  int nno;
-  int adjno;
 
   if(p->proto_state != PS_UP)
   {
index 63a95435cc6dfa7fe2b110b53f9f760d345097c8..441bf04a223a8b0c8b60cb1aa0600353f00059bd 100644 (file)
@@ -31,7 +31,6 @@ fill_ospf_pkt_hdr (struct ospf_iface *ifa, void *buf, u8 h_type)
 void
 ospf_tx_authenticate (struct ospf_iface *ifa, struct ospf_packet *pkt)
 {
-  int i;
   pkt->autype = htons (ifa->autype);
   memcpy (pkt->authetication, ifa->aukey, 8);
   return;
@@ -86,8 +85,6 @@ ospf_rx_hook (sock *sk, int size)
   struct ospf_packet *ps;
   struct ospf_iface *ifa = (struct ospf_iface *) (sk->data);
   struct proto *p = (struct proto *) (ifa->proto);
-  int i;
-  u8 *pu8;
 
   if (ifa->stub)
     return (1);
@@ -218,7 +215,7 @@ ospf_tx_hook (sock * sk)
 }
 
 void
-ospf_err_hook (sock * sk, int err)
+ospf_err_hook (sock * sk, int err UNUSED)
 {
   struct ospf_iface *ifa;
   struct proto *p;
@@ -241,8 +238,6 @@ sk_send_to_agt (sock * sk, u16 len, struct ospf_iface *ifa, u8 state)
 void
 sk_send_to_bdr (sock * sk, u16 len, struct ospf_iface *ifa)
 {
-  struct ospf_neighbor *n;
-
   if (ipa_compare (ifa->drip, ipa_from_u32 (0)) != 0)
     sk_send_to (sk, len, ifa->drip, OSPF_PROTO);
   if (ipa_compare (ifa->bdrip, ipa_from_u32 (0)) != 0)
index 5a826746bee349aa7d8f5b118cc0deda1451dbb2..72076bcd76f4fd90df1c90847db2cf8f75c871bc 100644 (file)
@@ -46,14 +46,12 @@ init_efib(struct fib_node *fn)
 void
 ospf_rt_spfa(struct ospf_area *oa)
 {
-  struct top_hash_entry *en;
   u32 i,*rts;
   struct ospf_lsa_rt *rt;
   struct ospf_lsa_rt_link *rtl,*rr;
   struct fib *in=&oa->infib;
   struct infib *nf;
   struct fib_iterator fit;
-  int age=0,flush=0;
   struct proto *p=&oa->po->proto;
   struct proto_ospf *po=oa->po;
   ip_addr ip;
@@ -280,7 +278,6 @@ ospf_ext_spfa(struct proto_ospf *po)        /* FIXME looking into inter-area */
   struct proto *p=&po->proto;
   struct ospf_lsa_ext *le;
   struct ospf_lsa_ext_tos *lt;
-  struct ospf_lsa_rt *rt;
   int mlen;
   ip_addr ip,nnh;
   struct iface *nnhi=NULL;
@@ -527,7 +524,6 @@ noch:
         nf->oldtag=nf->tag;
       }
   }
-let:
   FIB_ITERATE_END(nftmp);
 }
 
@@ -537,9 +533,8 @@ add_cand(list *l, struct top_hash_entry *en, struct top_hash_entry *par,
   u16 dist, struct ospf_area *oa)
 {
   node *prev,*n;
-  int flag=0,added=0;
+  int added=0;
   struct top_hash_entry *act;
-  struct proto *p=&oa->po->proto;
 
   if(en==NULL) return;
   if(en->lsa.age==LSA_MAXAGE) return;
index 9d35bac83b652b643e9d6e7d49acc20e8d631d98..81d35cc58f342a5df3eefc2184d8ed663b8aa711 100644 (file)
@@ -29,8 +29,6 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 *length, struct proto_ospf *p)
   struct ospf_lsa_rt *rt;
   struct ospf_lsa_rt_link *ln;
   struct ospf_neighbor *neigh;
-  struct top_hash_entry *old;
-  struct proto_ospf *po=(struct proto_ospf *)p;
 
   DBG("%s: Originating RT_lsa body for area \"%I\".\n", po->proto.name,
     oa->areaid);
@@ -155,8 +153,6 @@ addifa_rtlsa(struct ospf_iface *ifa)
 {
   struct ospf_area *oa;
   struct proto_ospf *po=ifa->proto;
-  struct proto *p=&po->proto;
-
 
   WALK_LIST(NODE oa,po->area_list)
   {
@@ -264,7 +260,6 @@ originate_net_lsa(struct ospf_iface *ifa)
   struct proto_ospf *po=ifa->proto;
   struct ospf_lsa_header lsa;
   u32 rtid=po->proto.cf->global->router_id;
-  struct top_hash_entry *en;
   struct proto *p=&po->proto;
   void *body;
 
@@ -322,7 +317,6 @@ originate_ext_lsa_body(net *n, rte *e, struct proto_ospf *po, struct ea_list *at
   struct proto *p=&po->proto;
   struct ospf_lsa_ext *ext;
   struct ospf_lsa_ext_tos *et;
-  neighbor *nn;
   u32 m1 = ea_get_int(attrs, EA_OSPF_METRIC1, LSINFINITY);
   u32 m2 = ea_get_int(attrs, EA_OSPF_METRIC2, 10000);
   u32 tag = ea_get_int(attrs, EA_OSPF_TAG, 0);
@@ -673,7 +667,6 @@ can_flush_lsa(struct ospf_area *oa)
 {
   struct ospf_iface *ifa;
   struct ospf_neighbor *n;
-  struct proto_ospf *po=oa->po;
 
   WALK_LIST(ifa, iface_list)
   {