Only warning left is the known lvalue problem in ripng_nexthop.c.

This commit is contained in:
hasso 2004-10-08 06:32:23 +00:00
parent 27a43a8100
commit 7a1d583c02
7 changed files with 26 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2004-10-08 Hasso Tepper <hasso at quagga.net>
* *.[c|h]: Fix compiler warnings: make strings const, signed ->
unsigned etc.
2004-09-26 Hasso Tepper <hasso at quagga.net> 2004-09-26 Hasso Tepper <hasso at quagga.net>
* ripingd.c: Access list hook argument function must have struct * ripingd.c: Access list hook argument function must have struct

View File

@ -604,7 +604,7 @@ ripng_enable_network_add (struct prefix *p)
return -1; return -1;
} }
else else
node->info = "enabled"; node->info = (char *) "enabled";
/* XXX: One should find a better solution than a generic one */ /* XXX: One should find a better solution than a generic one */
ripng_enable_apply_all(); ripng_enable_apply_all();
@ -638,7 +638,7 @@ ripng_enable_network_delete (struct prefix *p)
int int
ripng_enable_if_lookup (char *ifname) ripng_enable_if_lookup (char *ifname)
{ {
int i; unsigned int i;
char *str; char *str;
for (i = 0; i < vector_max (ripng_enable_if); i++) for (i = 0; i < vector_max (ripng_enable_if); i++)
@ -836,7 +836,7 @@ ripng_enable_apply_all ()
void void
ripng_clean_network () ripng_clean_network ()
{ {
int i; unsigned int i;
char *str; char *str;
struct route_node *rn; struct route_node *rn;
@ -862,7 +862,7 @@ vector Vripng_passive_interface;
int int
ripng_passive_interface_lookup (char *ifname) ripng_passive_interface_lookup (char *ifname)
{ {
int i; unsigned int i;
char *str; char *str;
for (i = 0; i < vector_max (Vripng_passive_interface); i++) for (i = 0; i < vector_max (Vripng_passive_interface); i++)
@ -937,7 +937,7 @@ ripng_passive_interface_unset (struct vty *vty, char *ifname)
void void
ripng_passive_interface_clean (void) ripng_passive_interface_clean (void)
{ {
int i; unsigned int i;
char *str; char *str;
for (i = 0; i < vector_max (Vripng_passive_interface); i++) for (i = 0; i < vector_max (Vripng_passive_interface); i++)
@ -953,7 +953,7 @@ ripng_passive_interface_clean (void)
int int
ripng_network_write (struct vty *vty, int config_mode) ripng_network_write (struct vty *vty, int config_mode)
{ {
int i; unsigned int i;
char *ifname; char *ifname;
struct route_node *node; struct route_node *node;
char buf[BUFSIZ]; char buf[BUFSIZ];

View File

@ -96,7 +96,7 @@ int vty_port = RIPNG_VTY_PORT;
struct thread_master *master; struct thread_master *master;
/* Process ID saved for use by init system */ /* Process ID saved for use by init system */
char *pid_file = PATH_RIPNGD_PID; const char *pid_file = PATH_RIPNGD_PID;
/* Help information display. */ /* Help information display. */
static void static void

View File

@ -45,7 +45,7 @@ struct rip_metric_modifier
int int
ripng_route_match_add (struct vty *vty, struct route_map_index *index, ripng_route_match_add (struct vty *vty, struct route_map_index *index,
char *command, char *arg) const char *command, char *arg)
{ {
int ret; int ret;
@ -69,7 +69,7 @@ ripng_route_match_add (struct vty *vty, struct route_map_index *index,
int int
ripng_route_match_delete (struct vty *vty, struct route_map_index *index, ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
char *command, char *arg) const char *command, char *arg)
{ {
int ret; int ret;
@ -93,7 +93,7 @@ ripng_route_match_delete (struct vty *vty, struct route_map_index *index,
int int
ripng_route_set_add (struct vty *vty, struct route_map_index *index, ripng_route_set_add (struct vty *vty, struct route_map_index *index,
char *command, char *arg) const char *command, char *arg)
{ {
int ret; int ret;
@ -117,7 +117,7 @@ ripng_route_set_add (struct vty *vty, struct route_map_index *index,
int int
ripng_route_set_delete (struct vty *vty, struct route_map_index *index, ripng_route_set_delete (struct vty *vty, struct route_map_index *index,
char *command, char *arg) const char *command, char *arg)
{ {
int ret; int ret;

View File

@ -207,7 +207,7 @@ ripng_redistribute_routemap_unset (int type)
static struct { static struct {
int type; int type;
int str_min_len; int str_min_len;
char *str; const char *str;
} redist_type[] = { } redist_type[] = {
{ZEBRA_ROUTE_KERNEL, 1, "kernel"}, {ZEBRA_ROUTE_KERNEL, 1, "kernel"},
{ZEBRA_ROUTE_CONNECT, 1, "connected"}, {ZEBRA_ROUTE_CONNECT, 1, "connected"},
@ -484,8 +484,8 @@ void
ripng_redistribute_write (struct vty *vty, int config_mode) ripng_redistribute_write (struct vty *vty, int config_mode)
{ {
int i; int i;
char *str[] = { "system", "kernel", "connected", "static", "rip", const char *str[] = { "system", "kernel", "connected", "static", "rip",
"ripng", "ospf", "ospf6", "isis", "bgp"}; "ripng", "ospf", "ospf6", "isis", "bgp"};
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
if (i != zclient->redist_default && zclient->redist[i]) if (i != zclient->redist_default && zclient->redist[i])

View File

@ -296,11 +296,11 @@ ripng_recv_packet (int sock, u_char *buf, int bufsize,
/* Dump rip packet */ /* Dump rip packet */
void void
ripng_packet_dump (struct ripng_packet *packet, int size, char *sndrcv) ripng_packet_dump (struct ripng_packet *packet, int size, const char *sndrcv)
{ {
caddr_t lim; caddr_t lim;
struct rte *rte; struct rte *rte;
char *command_str; const char *command_str;
/* Set command string. */ /* Set command string. */
if (packet->command == RIPNG_REQUEST) if (packet->command == RIPNG_REQUEST)
@ -1935,12 +1935,13 @@ ripng_event (enum ripng_event event, int sock)
} }
} }
/* Each route type's strings and default preference. */ /* Each route type's strings and default preference.
* FIXME: ISIS? What are these distance values? */
struct struct
{ {
int key; int key;
char *str; const char *str;
char *str_long; const char *str_long;
int distance; int distance;
} route_info[] = } route_info[] =
{ {

View File

@ -395,7 +395,7 @@ int ripng_write_rte (int num, struct stream *s, struct prefix_ipv6 *p,
int ripng_send_packet (caddr_t buf, int bufsize, struct sockaddr_in6 *to, int ripng_send_packet (caddr_t buf, int bufsize, struct sockaddr_in6 *to,
struct interface *ifp); struct interface *ifp);
void ripng_packet_dump (struct ripng_packet *packet, int size, char *sndrcv); void ripng_packet_dump (struct ripng_packet *packet, int size, const char *sndrcv);
#endif /* _ZEBRA_RIPNG_RIPNGD_H */ #endif /* _ZEBRA_RIPNG_RIPNGD_H */