summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-01-01 12:32:03 +0100
committerHarald Welte <laforge@gnumonks.org>2015-01-01 12:32:03 +0100
commit7b1d25a11e44bbc1cb0d2acd9f1a3d4a16ec7c90 (patch)
tree066ebdd55b1df8e83748c3133b0c8a5e952404b9 /openbsc/src
parent7b129e76cebee739dc959d70d7c8c257e83c76b1 (diff)
Fix most compiler warnings with gcc-4.9.2
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libbsc/bsc_api.c5
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c2
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c1
-rw-r--r--openbsc/src/utils/smpp_mirror.c6
4 files changed, 9 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 5ce0bc41d..76ceb2d8b 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -89,6 +89,7 @@ static uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
channel = 0x9;
break;
case GSM_LCHAN_UNKNOWN:
+ default:
LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %p\n", lchan);
break;
}
@@ -416,7 +417,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
- LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %u\n",
+ LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %zu\n",
msgb_l3len(msg) - sizeof(*gh));
return;
}
@@ -461,7 +462,7 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
- LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %u\n",
+ LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %zu\n",
msgb_l3len(msg) - sizeof(*gh));
rr_failure = NULL;
} else {
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 5df357776..f22dd2012 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -309,7 +309,7 @@ static int write_response_sdp(struct mgcp_endpoint *endp,
return len;
buffer_too_small:
- LOGP(DMGCP, LOGL_ERROR, "SDP buffer too small: %d (needed %d)\n",
+ LOGP(DMGCP, LOGL_ERROR, "SDP buffer too small: %zd (needed %d)\n",
size, len);
return -1;
}
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 753fd88cc..351789992 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -50,6 +50,7 @@
#include <osmocom/ctrl/ports.h>
#include <openbsc/ctrl.h>
#include <openbsc/osmo_bsc_rf.h>
+#include <openbsc/smpp.h>
#include "../../bscconfig.h"
diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c
index 488c4a193..cf3657e39 100644
--- a/openbsc/src/utils/smpp_mirror.c
+++ b/openbsc/src/utils/smpp_mirror.c
@@ -247,7 +247,7 @@ dead_socket:
return 0;
}
-static void esme_write_cb(struct osmo_fd *ofd, struct msgb *msg)
+static int esme_write_cb(struct osmo_fd *ofd, struct msgb *msg)
{
struct esme *esme = ofd->data;
int rc;
@@ -260,8 +260,10 @@ static void esme_write_cb(struct osmo_fd *ofd, struct msgb *msg)
exit(99);
} else if (rc < msgb_length(msg)) {
LOGP(DSMPP, LOGL_ERROR, "[%s] Short write\n", esme->system_id);
- return;
+ return 0;
}
+
+ return 0;
}
static int smpp_esme_init(struct esme *esme, const char *host, uint16_t port)