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
ip_pton(char *a, ip_addr *o)
{
int i,j;
int i;
unsigned long int l;
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 *end = buf + size - 8;
int sp = 1;
int l, type, isset, as;
int l, isset;
while (p < e)
{

View 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)

View 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;

View 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)

View 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);

View 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);

View 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;

View 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)