mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-27 13:26:21 +00:00
Fix warnings. Didn't even look at files not compiled in Linux though.
This commit is contained in:
parent
1cd80845dc
commit
fce954f8de
@ -1,3 +1,8 @@
|
||||
2004-10-07 Hasso Tepper <hasso at quagga.net>
|
||||
|
||||
* connected.c, main.c, rt_netlink.c, rtadv.c, zebra_rib.c, zserv.c:
|
||||
Fix warnings: make strings const, signed -> unsigned.
|
||||
|
||||
2004-10-05 Paul Jakma <paul@dishone.st>
|
||||
|
||||
* irdp_packet.c: (parse_irdp_packet) style issues.
|
||||
|
||||
@ -279,7 +279,7 @@ connected_up_ipv6 (struct interface *ifp, struct connected *ifc)
|
||||
/* Add connected IPv6 route to the interface. */
|
||||
void
|
||||
connected_add_ipv6 (struct interface *ifp, struct in6_addr *addr,
|
||||
int prefixlen, struct in6_addr *broad)
|
||||
u_char prefixlen, struct in6_addr *broad)
|
||||
{
|
||||
struct prefix_ipv6 *p;
|
||||
struct connected *ifc;
|
||||
@ -367,7 +367,7 @@ connected_down_ipv6 (struct interface *ifp, struct connected *ifc)
|
||||
|
||||
void
|
||||
connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address,
|
||||
int prefixlen, struct in6_addr *broad)
|
||||
u_char prefixlen, struct in6_addr *broad)
|
||||
{
|
||||
struct prefix_ipv6 p;
|
||||
struct connected *ifc;
|
||||
|
||||
@ -109,7 +109,7 @@ struct zebra_privs_t zserv_privs =
|
||||
char config_default[] = SYSCONFDIR DEFAULT_CONFIG_FILE;
|
||||
|
||||
/* Process ID saved for use by init system */
|
||||
char *pid_file = PATH_ZEBRA_PID;
|
||||
const char *pid_file = PATH_ZEBRA_PID;
|
||||
|
||||
/* Help information display. */
|
||||
static void
|
||||
|
||||
@ -47,7 +47,7 @@ struct nlsock
|
||||
int sock;
|
||||
int seq;
|
||||
struct sockaddr_nl snl;
|
||||
char *name;
|
||||
const char *name;
|
||||
} netlink = { -1, 0, {0}, "netlink-listen"}, /* kernel messages */
|
||||
netlink_cmd = { -1, 0, {0}, "netlink-cmd"}, /* command channel */
|
||||
netlink_addr = { -1, 0, {0}, "netlink-addr"}; /* address channel */
|
||||
@ -65,7 +65,7 @@ struct message nlmsg_str[] = {
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
char *nexthop_types_desc[] =
|
||||
const char *nexthop_types_desc[] =
|
||||
{
|
||||
"none",
|
||||
"Directly connected",
|
||||
|
||||
@ -349,7 +349,7 @@ rtadv_process_advert ()
|
||||
}
|
||||
|
||||
void
|
||||
rtadv_process_packet (u_char *buf, int len, unsigned int ifindex, int hoplimit)
|
||||
rtadv_process_packet (u_char *buf, unsigned int len, unsigned int ifindex, int hoplimit)
|
||||
{
|
||||
struct icmp6_hdr *icmph;
|
||||
struct interface *ifp;
|
||||
@ -429,7 +429,7 @@ rtadv_read (struct thread *thread)
|
||||
return len;
|
||||
}
|
||||
|
||||
rtadv_process_packet (buf, len, ifindex, hoplimit);
|
||||
rtadv_process_packet (buf, (unsigned)len, ifindex, hoplimit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ vector vrf_vector;
|
||||
|
||||
/* Allocate new VRF. */
|
||||
struct vrf *
|
||||
vrf_alloc (char *name)
|
||||
vrf_alloc (const char *name)
|
||||
{
|
||||
struct vrf *vrf;
|
||||
|
||||
@ -102,7 +102,7 @@ vrf_lookup (u_int32_t id)
|
||||
struct vrf *
|
||||
vrf_lookup_by_name (char *name)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
struct vrf *vrf;
|
||||
|
||||
for (i = 0; i < vector_max (vrf_vector); i++)
|
||||
|
||||
@ -51,7 +51,7 @@ static void zebra_event (enum event event, int sock, struct zserv *client);
|
||||
extern struct zebra_privs_t zserv_privs;
|
||||
|
||||
/* For logging of zebra meesages. */
|
||||
static char *zebra_command_str [] =
|
||||
static const char *zebra_command_str [] =
|
||||
{
|
||||
"NULL",
|
||||
"ZEBRA_INTERFACE_ADD",
|
||||
@ -169,7 +169,8 @@ zebra_server_send_message (int sock, u_char *buf, unsigned long length)
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
else if (nbytes != length)
|
||||
/* It's clear that nbytes is positive at this point. */
|
||||
else if ((unsigned) nbytes != length)
|
||||
zebra_server_enqueue (sock, buf, length, nbytes);
|
||||
|
||||
return 0;
|
||||
@ -1449,7 +1450,7 @@ zebra_serv ()
|
||||
|
||||
/* zebra server UNIX domain socket. */
|
||||
static void
|
||||
zebra_serv_un (char *path)
|
||||
zebra_serv_un (const char *path)
|
||||
{
|
||||
int ret;
|
||||
int sock, len;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user