mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Fix more warnings
This commit is contained in:
6
bgpq4.c
6
bgpq4.c
@@ -112,7 +112,7 @@ usage(int ecode)
|
||||
}
|
||||
|
||||
static void
|
||||
version()
|
||||
version(void)
|
||||
{
|
||||
printf(PACKAGE_NAME " - a versatile utility to generate BGP filters\n"
|
||||
"version: " PACKAGE_VERSION "\n"
|
||||
@@ -122,7 +122,7 @@ version()
|
||||
}
|
||||
|
||||
static void
|
||||
exclusive()
|
||||
exclusive(void)
|
||||
{
|
||||
fprintf(stderr,"-E, -f <asnum>, -G <asnum>, and -t are mutually "
|
||||
"exclusive\n");
|
||||
@@ -130,7 +130,7 @@ exclusive()
|
||||
}
|
||||
|
||||
static void
|
||||
vendor_exclusive()
|
||||
vendor_exclusive(void)
|
||||
{
|
||||
fprintf(stderr, "-b (BIRD), -B (OpenBGPD), -F (formatted), -J (Junos),"
|
||||
" -j (JSON), -N (Nokia SR OS Classic), -n (Nokia SR OS MD-CLI),"
|
||||
|
||||
@@ -1308,7 +1308,7 @@ bgpq4_print_ceacl(struct sx_radix_node *n, void *ff)
|
||||
{
|
||||
char prefix[128];
|
||||
FILE *f = (FILE*)ff;
|
||||
char* c;
|
||||
char *c;
|
||||
uint32_t netmask = 0xfffffffful;
|
||||
|
||||
if (!f)
|
||||
@@ -1365,7 +1365,7 @@ bgpq4_print_ceacl(struct sx_radix_node *n, void *ff)
|
||||
fprintf(f, " permit ip %s ",
|
||||
inet_ntoa(n->prefix->addr.addr));
|
||||
fprintf(f, "%s ",
|
||||
inet_ntoa(*(struct in_addr*) & wildaddr));
|
||||
inet_ntoa(*(struct in_addr*)&wildaddr));
|
||||
} else {
|
||||
fprintf(f, " permit ip host %s ",
|
||||
inet_ntoa(n->prefix->addr.addr));
|
||||
@@ -1373,16 +1373,16 @@ bgpq4_print_ceacl(struct sx_radix_node *n, void *ff)
|
||||
|
||||
if (wildmask) {
|
||||
fprintf(f, "%s ",
|
||||
inet_ntoa(*(struct in_addr*) & mask));
|
||||
inet_ntoa(*(struct in_addr*)&mask));
|
||||
fprintf(f, "%s\n",
|
||||
inet_ntoa(*(struct in_addr*) & wildmask));
|
||||
inet_ntoa(*(struct in_addr*)&wildmask));
|
||||
} else {
|
||||
fprintf(f, "host %s\n",
|
||||
inet_ntoa(*(struct in_addr*) & mask));
|
||||
inet_ntoa(*(struct in_addr*)&mask));
|
||||
}
|
||||
} else {
|
||||
fprintf(f, " permit ip host %s host %s\n", prefix,
|
||||
inet_ntoa(*(struct in_addr*) & netmask));
|
||||
inet_ntoa(*(struct in_addr*)&netmask));
|
||||
}
|
||||
|
||||
checkSon:
|
||||
|
||||
@@ -290,7 +290,7 @@ sx_prefix_range_parse(struct sx_radix_tree *tree, int af, unsigned int maxlen,
|
||||
{
|
||||
char *d = strchr(text, '^');
|
||||
struct sx_prefix *p;
|
||||
unsigned long min, max;
|
||||
unsigned long min, max = 0;
|
||||
|
||||
p = sx_prefix_alloc(NULL);
|
||||
|
||||
@@ -367,7 +367,7 @@ sx_prefix_range_parse(struct sx_radix_tree *tree, int af, unsigned int maxlen,
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct sx_prefix*
|
||||
struct sx_prefix *
|
||||
sx_prefix_new(int af, char *text)
|
||||
{
|
||||
struct sx_prefix *p = NULL;
|
||||
|
||||
Reference in New Issue
Block a user