Skip to content
Browse files

Address some other compilation warnings.

  • Loading branch information...
1 parent bbf85aa commit 4bddbe582ec062c3f2c1d584654c57bc8cd36aad @boutier boutier committed with
Showing with 8 additions and 7 deletions.
  1. +3 −2 interface.c
  2. +1 −1 kernel.c
  3. +2 −2 kernel_socket.c
  4. +1 −1 local.c
  5. +1 −1 message.c
View
5 interface.c
@@ -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);
View
2 kernel.c
@@ -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);
}
View
4 kernel_socket.c
@@ -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;
View
2 local.c
@@ -112,7 +112,7 @@ local_notify_self()
return;
}
-static char *
+static const char *
local_kind(int kind)
{
switch(kind) {
View
2 message.c
@@ -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,

0 comments on commit 4bddbe5

Please sign in to comment.
Something went wrong with that request. Please try again.