work around bogus compiler warnings
Change-Id: I9170e4de857c1f3e003a480b12dd16fe796ec763
diff --git a/daemon/daemon_vty.c b/daemon/daemon_vty.c
index efd9c0f..c84c727 100644
--- a/daemon/daemon_vty.c
+++ b/daemon/daemon_vty.c
@@ -127,7 +127,7 @@
"Local IP address\n" "Local UDP Port\n")
{
struct gtp_endpoint *ep;
- struct addrinfo *ai;
+ struct addrinfo *ai = NULL;
const char *ipstr;
uint16_t port = GTP1U_PORT;
diff --git a/daemon/gtp_tunnel.c b/daemon/gtp_tunnel.c
index 0d049c7..f9075f7 100644
--- a/daemon/gtp_tunnel.c
+++ b/daemon/gtp_tunnel.c
@@ -83,6 +83,7 @@
return NULL;
}
+#if 0
/* find tunnel by R(x_teid), T(x_teid) + A(ddr) */
static struct gtp_tunnel *
_gtp_tunnel_find_rta(struct gtp_daemon *d, uint32_t rx_teid, uint32_t tx_teid,
@@ -96,6 +97,7 @@
}
return NULL;
}
+#endif
/* find tunnel by R(x_teid) + optionally local endpoint */
struct gtp_tunnel *
diff --git a/daemon/main.c b/daemon/main.c
index 863b8b4..a408df4 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -378,7 +378,7 @@
const char *cmd, *user;
char **addl_env = NULL;
sigset_t oldmask;
- int nsfd, rc;
+ int nsfd = -1, rc;
juser = json_object_get(sprog, "run_as_user");
jcmd = json_object_get(sprog, "command");
diff --git a/daemon/tun_device.c b/daemon/tun_device.c
index 738d492..b1bd7fc 100644
--- a/daemon/tun_device.c
+++ b/daemon/tun_device.c
@@ -205,7 +205,7 @@
if (name) {
/* if a TUN interface name was specified, put it in the structure; otherwise,
the kernel will try to allocate the "next" device of the specified type */
- strncpy(ifr.ifr_name, name, IFNAMSIZ);
+ osmo_strlcpy(ifr.ifr_name, name, IFNAMSIZ);
}
/* try to create the device */