aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-03 09:28:41 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-03 09:38:07 +0200
commite15d59222031db3459db30fd1b01b9269d7a96bb (patch)
tree734e9e8a08606b7ed3140926fed54d47f75dbe88 /openbsc/src
parent5c06e4045aa3c23e535af09a108360b4a4365c74 (diff)
64bit: Fix compiler warnings in regard to 64bit
vty_interface_layer3.c:584:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] sizeof(subscr->extension)-1, VTY_NEWLINE);
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c4
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c2
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 1515aea0a..71fff936f 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -547,7 +547,7 @@ DEFUN(ena_subscr_name,
if (strlen(name) > sizeof(subscr->name)-1) {
vty_out(vty,
- "%% NAME is too long, max. %d characters are allowed%s",
+ "%% NAME is too long, max. %zu characters are allowed%s",
sizeof(subscr->name)-1, VTY_NEWLINE);
return CMD_WARNING;
}
@@ -580,7 +580,7 @@ DEFUN(ena_subscr_extension,
if (strlen(ext) > sizeof(subscr->extension)-1) {
vty_out(vty,
- "%% EXTENSION is too long, max. %d characters are allowed%s",
+ "%% EXTENSION is too long, max. %zu characters are allowed%s",
sizeof(subscr->extension)-1, VTY_NEWLINE);
return CMD_WARNING;
}
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 5f703c290..1c03f27d4 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -156,7 +156,7 @@ static int read_call_agent(struct osmo_fd *fd, unsigned int what)
return -1;
} else if (slen > sizeof(addr)) {
fprintf(stderr, "Gateway received message from outerspace: %zu %zu\n",
- slen, sizeof(addr));
+ (size_t) slen, sizeof(addr));
return -1;
}
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
index faceb59b5..9291c89e6 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
@@ -45,10 +45,10 @@ static void insert_rewrite_node(struct nat_rewrite_rule *rule, struct nat_rewrit
{
struct nat_rewrite_rule *new = &root->rule;
- const size_t len = strlen(rule->prefix);
+ const int len = strlen(rule->prefix);
int i;
- if (len == 0) {
+ if (len <= 0) {
LOGP(DNAT, LOGL_ERROR, "An empty prefix does not make sense.\n");
goto fail;
}