0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Removed a lot of unused variables.

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.)
This commit is contained in:
Martin Mares 2000-05-04 20:30:36 +00:00
parent c817b9916f
commit 93a786cb03
9 changed files with 4 additions and 14 deletions

View File

@ -72,7 +72,7 @@ ipv4_class_mask(u32 a)
int int
ip_pton(char *a, ip_addr *o) ip_pton(char *a, ip_addr *o)
{ {
int i,j; int i;
unsigned long int l; unsigned long int l;
u32 ia = 0; u32 ia = 0;

View File

@ -47,7 +47,7 @@ as_path_format(struct adata *path, byte *buf, unsigned int size)
byte *e = p + path->length; byte *e = p + path->length;
byte *end = buf + size - 8; byte *end = buf + size - 8;
int sp = 1; int sp = 1;
int l, type, isset, as; int l, isset;
while (p < e) while (p < e)
{ {

View File

@ -202,7 +202,6 @@ struct iface *
if_update(struct iface *new) if_update(struct iface *new)
{ {
struct iface *i; struct iface *i;
struct ifa *a, *b;
unsigned c; unsigned c;
WALK_LIST(i, iface_list) WALK_LIST(i, iface_list)
@ -263,7 +262,7 @@ if_end_partial_update(struct iface *i)
void void
if_end_update(void) if_end_update(void)
{ {
struct iface *i, j; struct iface *i;
struct ifa *a, *b; struct ifa *a, *b;
if (!config->router_id) if (!config->router_id)

View File

@ -460,7 +460,6 @@ proto_notify_state(struct proto *p, unsigned ps)
} }
break; break;
default: default:
error:
bug("Invalid state transition for %s from %s/%s to */%s", p->name, c_states[cs], p_states[ops], p_states[ps]); 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; p->proto_state = ps;

View File

@ -747,7 +747,6 @@ rt_show_cleanup(struct cli *c)
void void
rt_show(struct rt_show_data *d) rt_show(struct rt_show_data *d)
{ {
struct rtable_config *tc;
net *n; net *n;
if (d->pxlen == 256) if (d->pxlen == 256)

View File

@ -77,7 +77,6 @@ bgp_create_update(struct bgp_conn *conn, byte *buf)
struct bgp_bucket *buck; struct bgp_bucket *buck;
int remains = BGP_MAX_PACKET_LENGTH - BGP_HEADER_LENGTH - 4; int remains = BGP_MAX_PACKET_LENGTH - BGP_HEADER_LENGTH - 4;
byte *w; byte *w;
ip_addr ip;
int wd_size = 0; int wd_size = 0;
int r_size = 0; int r_size = 0;
int a_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 static void
bgp_rx_notification(struct bgp_conn *conn, byte *pkt, int len) bgp_rx_notification(struct bgp_conn *conn, byte *pkt, int len)
{ {
unsigned arg;
if (len < 21) if (len < 21)
{ {
bgp_error(conn, 1, 2, pkt+16, 2); bgp_error(conn, 1, 2, pkt+16, 2);

View File

@ -463,7 +463,6 @@ nl_send_route(struct krt_proto *p, rte *e, int new)
struct rtmsg r; struct rtmsg r;
char buf[128]; char buf[128];
} r; } r;
struct nlmsghdr *reply;
DBG("nl_send_route(%I/%d,new=%d)\n", net->n.prefix, net->n.pxlen, new); DBG("nl_send_route(%I/%d,new=%d)\n", net->n.prefix, net->n.pxlen, new);

View File

@ -521,7 +521,7 @@ sk_passive_connected(sock *s, struct sockaddr *sa, int al, int type)
int int
sk_open(sock *s) sk_open(sock *s)
{ {
int fd, e; int fd;
sockaddr sa; sockaddr sa;
int one = 1; int one = 1;
int type = s->type; int type = s->type;

View File

@ -544,9 +544,7 @@ sentenced:
static void static void
krt_prune(struct krt_proto *p) krt_prune(struct krt_proto *p)
{ {
struct proto *pp = &p->p;
struct rtable *t = p->p.table; struct rtable *t = p->p.table;
struct fib_node *f;
KRT_TRACE(p, D_EVENTS, "Pruning table %s", t->name); KRT_TRACE(p, D_EVENTS, "Pruning table %s", t->name);
FIB_WALK(&t->fib, f) FIB_WALK(&t->fib, f)
@ -605,7 +603,6 @@ void
krt_got_route_async(struct krt_proto *p, rte *e, int new) krt_got_route_async(struct krt_proto *p, rte *e, int new)
{ {
net *net = e->net; net *net = e->net;
rte *old = net->routes;
int src = e->u.krt.src; int src = e->u.krt.src;
switch (src) switch (src)