summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasso <hasso>2004-03-04 17:45:00 +0000
committerhasso <hasso>2004-03-04 17:45:00 +0000
commitfa2b17e39499a77f41a719035a588b7fb63cec63 (patch)
tree3356703917aaa8359e0106ae3c2340ee6eea0e1f
parentcaa6f8ac7d07f8cd3269255e6dce6d248f74af62 (diff)
Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGER
from vtysh ([quagga-dev 932]).
-rw-r--r--ChangeLog30
-rw-r--r--bgpd/bgp_nexthop.c9
-rw-r--r--lib/debug.c2
-rw-r--r--lib/keychain.c4
-rw-r--r--ospf6d/ospf6_damp.c8
-rw-r--r--ospf6d/ospf6_main.c6
-rw-r--r--ospfd/ospf_abr.c4
-rw-r--r--ospfd/ospf_flood.c1
-rw-r--r--ospfd/ospf_route.c4
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--vtysh/ChangeLog4
-rw-r--r--vtysh/vtysh.c8
-rw-r--r--zebra/rt_socket.c2
-rw-r--r--zebra/rtadv.c4
-rw-r--r--zebra/zserv.c9
15 files changed, 79 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index c2493284..b90f093c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2004-03-03 PC Drew <pc@superiorcomm.net>
+
+ * lib/keychain.c: typecast time_t function to long, fixes compile
+ warning.
+ * lib/debug.c: wrapped function with ifdef HAVE_GLIBC_BACKTRACE fixes
+ compile warning when backtrace doesn't exist for that system.
+ * zebra/rtadv.c: for OpenBSD, added include statement for
+ netinet/icmp6.h
+ * zebra/zserv.c: added default case to switch statements, fixes compile
+ warning about certain NEXTHOP_TYPE enumeration values not being
+ handled.
+ * zebra/rt_socket.c: set *mask = NULL by default, fixes compile
+ warning, about mask possibly being used uninitialized.
+ * bgpd/bgp_nexthop.c: added default case to switch statements, fixes
+ compile warning about certain NEXTHOP_TYPE enumeration values not
+ being handled.
+ * ospfd/ospf_spf.c: typecast time_t to long, fixes compile warning.
+ * ospfd/ospf_route.c: typecast route_node->prefix to prefix_ipv4, fixes
+ compile warning.
+ * ospfd/ospf_route.c: typecast prefix_ipv4 to prefix, fixes compile
+ warning.
+ * ospfd/ospf_abr.c: typecast prefix to prefix_ipv4 in two instances,
+ fixes compile warning.
+ * vtysh/vtysh.c: fixed null pointer sentinel value when doing execl and
+ friends, fixes compile warning.
+ * ospf6d/ospf6_damp.c: typecast time_t to long in 4 instances, fixes
+ compile warning.
+ * ospf6d/ospf6_main.c: use MAXPATHLEN (if set) instead of 64 for the
+ _cwd array, fixes compile warning.
+
2004-01-19 Paul Jakma <paul@dishone.st>
* tests/test-sig.c: New file, regression test for sigevents.
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 3b91373b..4f43b9d1 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -153,6 +153,9 @@ bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2)
return 0;
break;
#endif /* HAVE_IPV6 */
+ default:
+ /* do nothing */
+ break;
}
return 1;
}
@@ -882,6 +885,9 @@ zlookup_read ()
case ZEBRA_NEXTHOP_IFNAME:
nexthop->ifindex = stream_getl (s);
break;
+ default:
+ /* do nothing */
+ break;
}
bnc_nexthop_add (bnc, nexthop);
}
@@ -982,6 +988,9 @@ zlookup_read_ipv6 ()
case ZEBRA_NEXTHOP_IFNAME:
nexthop->ifindex = stream_getl (s);
break;
+ default:
+ /* do nothing */
+ break;
}
bnc_nexthop_add (bnc, nexthop);
}
diff --git a/lib/debug.c b/lib/debug.c
index c4b67a52..252e4dd7 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -4,6 +4,7 @@
void
debug_print_trace (int signal)
{
+#ifdef HAVE_GLIBC_BACKTRACE
void *array[10];
size_t size;
char **strings;
@@ -18,6 +19,7 @@ debug_print_trace (int signal)
printf ("%s\n", strings[i]);
free (strings);
+#endif /* HAVE_GLIBC_BACKTRACE */
exit(1);
}
diff --git a/lib/keychain.c b/lib/keychain.c
index dbf431a4..527da053 100644
--- a/lib/keychain.c
+++ b/lib/keychain.c
@@ -921,7 +921,7 @@ keychain_config_write (struct vty *vty)
vty_out (vty, " infinite");
else if (key->accept.duration)
vty_out (vty, " duration %ld",
- key->accept.end - key->accept.start);
+ (long)(key->accept.end - key->accept.start));
else
{
keychain_strftime (buf, BUFSIZ, &key->accept.end);
@@ -938,7 +938,7 @@ keychain_config_write (struct vty *vty)
if (key->send.end == -1)
vty_out (vty, " infinite");
else if (key->send.duration)
- vty_out (vty, " duration %ld", key->send.end - key->send.start);
+ vty_out (vty, " duration %ld", (long)(key->send.end - key->send.start));
else
{
keychain_strftime (buf, BUFSIZ, &key->send.end);
diff --git a/ospf6d/ospf6_damp.c b/ospf6d/ospf6_damp.c
index 878c48f6..40cf798d 100644
--- a/ospf6d/ospf6_damp.c
+++ b/ospf6d/ospf6_damp.c
@@ -279,7 +279,7 @@ ospf6_damp_stop (struct ospf6_damp_info *di)
gettimeofday (&now, NULL);
zlog_info ("DAMP: %lu.%06lu stop damping: %ld: type: %d, name: %s",
now.tv_sec, now.tv_usec,
- t_now, di->type, namebuf);
+ (long)t_now, di->type, namebuf);
}
/* set flag indicates that we're damping this target */
@@ -435,7 +435,7 @@ ospf6_damp_event (damp_event_t event_type,
gettimeofday (&now, NULL);
zlog_info ("DAMP: %lu.%06lu stop damping: %ld: type: %d, name: %s",
now.tv_sec, now.tv_usec,
- t_now, di->type, namebuf);
+ (long)t_now, di->type, namebuf);
}
di->damping = OFF;
}
@@ -450,7 +450,7 @@ ospf6_damp_event (damp_event_t event_type,
gettimeofday (&now, NULL);
zlog_info ("DAMP: %lu.%06lu start damping: %ld: type: %d, name: %s",
now.tv_sec, now.tv_usec,
- t_now, type, namebuf);
+ (long)t_now, type, namebuf);
}
di->damping = ON;
}
@@ -471,7 +471,7 @@ ospf6_damp_event (damp_event_t event_type,
gettimeofday (&now, NULL);
zlog_info ("DAMP: %lu.%06lu start damping: %ld: type: %d, name: %s",
now.tv_sec, now.tv_usec,
- t_now, type, namebuf);
+ (long) t_now, type, namebuf);
}
di->damping = ON;
}
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index be46f3fe..f0a23ebc 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -97,7 +97,13 @@ struct thread_master *master;
char *pid_file = PATH_OSPF6D_PID;
/* for reload */
+
+#ifdef MAXPATHLEN
+char _cwd[MAXPATHLEN];
+#else
char _cwd[64];
+#endif
+
char _progpath[64];
int _argc;
char **_argv;
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index bacae917..424d1d31 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -1078,7 +1078,7 @@ ospf_abr_process_network_rt (struct ospf *ospf,
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_abr_process_network_rt(): announcing");
- ospf_abr_announce_network (ospf, &rn->p, or);
+ ospf_abr_announce_network (ospf, (struct prefix_ipv4 *)&rn->p, or);
}
if (IS_DEBUG_OSPF_EVENT)
@@ -1474,7 +1474,7 @@ ospf_abr_announce_aggregates (struct ospf *ospf)
" a transit area");
continue;
}
- ospf_abr_announce_network_to_area (&p, range->cost, ar);
+ ospf_abr_announce_network_to_area ((struct prefix_ipv4 *)&p, range->cost, ar);
}
}
}
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index 05fcacda..22611d8d 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -355,7 +355,6 @@ ospf_flood_through_interface (struct ospf_interface *oi,
struct ospf_neighbor *inbr,
struct ospf_lsa *lsa)
{
- struct ospf *ospf = oi->ospf;
struct ospf_neighbor *onbr;
struct route_node *rn;
int retx_flag;
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index c1c11f19..9889d6be 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -192,8 +192,8 @@ ospf_route_delete_same_ext(struct route_table *external_routes,
{
if (rn && rn->info)
{
- struct prefix_ipv4 *p = &rn->p;
- if ( (ext_rn = route_node_lookup (external_routes, p)) )
+ struct prefix_ipv4 *p = (struct prefix_ipv4 *)(&rn->p);
+ if ( (ext_rn = route_node_lookup (external_routes, (struct prefix *)p)) )
{
ospf_zebra_delete (p, ext_rn->info);
if (ext_rn->info)
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 8399e18e..5ced71ca 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1132,7 +1132,7 @@ ospf_spf_calculate_schedule (struct ospf *ospf)
delay = ospf->spf_delay;
if (IS_DEBUG_OSPF_EVENT)
- zlog_info ("SPF: calculation timer delay = %ld", delay);
+ zlog_info ("SPF: calculation timer delay = %ld", (long)delay);
ospf->t_spf_calc =
thread_add_timer (master, ospf_spf_calculate_timer, ospf, delay);
}
diff --git a/vtysh/ChangeLog b/vtysh/ChangeLog
index 55421da5..f4bf9341 100644
--- a/vtysh/ChangeLog
+++ b/vtysh/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-04 Hasso Tepper <hasso@estpak.ee>
+
+ * vtysh.c: Remove using PAGER.
+
2004-01-15 Paul Jakma <paul@dishone.st>
* vtysh_config.c: Fix up strlen to use correct string.
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 36b7c585..c92c6c46 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -350,8 +350,6 @@ vtysh_pager_init ()
{
vtysh_pager_name = getenv ("VTYSH_PAGER");
if (! vtysh_pager_name)
- vtysh_pager_name = getenv ("PAGER");
- if (! vtysh_pager_name)
vtysh_pager_name = "more";
}
@@ -1465,13 +1463,13 @@ execute_command (char *command, int argc, char *arg1, char *arg2)
switch (argc)
{
case 0:
- ret = execlp (command, command, NULL);
+ ret = execlp (command, command, (const char *)NULL);
break;
case 1:
- ret = execlp (command, command, arg1, NULL);
+ ret = execlp (command, command, arg1, (const char *)NULL);
break;
case 2:
- ret = execlp (command, command, arg1, arg2, NULL);
+ ret = execlp (command, command, arg1, arg2, (const char *)NULL);
break;
}
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index d603c60d..5b2a5e71 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -71,7 +71,7 @@ int
kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family)
{
- struct sockaddr_in *mask;
+ struct sockaddr_in *mask = NULL;
struct sockaddr_in sin_dest, sin_mask, sin_gate;
struct nexthop *nexthop;
int nexthop_num = 0;
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 61abd95d..c98b11cf 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -41,6 +41,10 @@ extern struct zebra_privs_t zserv_privs;
#if defined (HAVE_IPV6) && defined (RTADV)
+#ifdef OPEN_BSD
+#include <netinet/icmp6.h>
+#endif
+
/* If RFC2133 definition is used. */
#ifndef IPV6_JOIN_GROUP
#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 0f30a559..833b369d 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -862,6 +862,9 @@ zsend_ipv6_nexthop_lookup (struct zserv *client, struct in6_addr *addr)
case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
+ default:
+ /* do nothing */
+ break;
}
num++;
}
@@ -921,6 +924,9 @@ zsend_ipv4_nexthop_lookup (struct zserv *client, struct in_addr addr)
case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
+ default:
+ /* do nothing */
+ break;
}
num++;
}
@@ -979,6 +985,9 @@ zsend_ipv4_import_lookup (struct zserv *client, struct prefix_ipv4 *p)
case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
+ default:
+ /* do nothing */
+ break;
}
num++;
}