Commit 4bddbe58 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Address some other compilation warnings.

parent bbf85aaf
......@@ -153,7 +153,7 @@ check_interface_ipv4(struct interface *ifp)
return 0;
}
int
static int
check_interface_channel(struct interface *ifp)
{
int channel = IF_CONF(ifp, channel);
......@@ -401,7 +401,8 @@ void
check_interfaces(void)
{
struct interface *ifp;
int rc, ifindex, ifindex_changed = 0;
int rc, ifindex_changed = 0;
unsigned int ifindex;
FOR_ALL_INTERFACES(ifp) {
ifindex = if_nametoindex(ifp->name);
......
......@@ -91,7 +91,7 @@ read_random_bytes(void *buf, size_t len)
rc = -1;
} else {
rc = read(fd, buf, len);
if(rc < len)
if(rc < 0 || (unsigned)rc < len)
rc = -1;
close(fd);
}
......
......@@ -153,7 +153,7 @@ static int old_accept_redirects = -1;
static int ifindex_lo = -1;
static int seq;
int
static int
mask2len(const struct in6_addr *addr)
{
int i = 0, j;
......@@ -180,7 +180,7 @@ mask2len(const struct in6_addr *addr)
return i;
}
void
static void
plen2mask(int n, struct in6_addr *dest)
{
unsigned char *p;
......
......@@ -112,7 +112,7 @@ local_notify_self()
return;
}
static char *
static const char *
local_kind(int kind)
{
switch(kind) {
......
......@@ -1089,7 +1089,7 @@ buffer_update(struct interface *ifp,
ifp->num_buffered_updates++;
}
void
static void
buffer_update_callback(struct babel_route *route, void *closure)
{
buffer_update((struct interface*)closure,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment