aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/smpp_openbsc.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-14 21:18:41 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 02:33:50 +0200
commit7e16e7299a0fc63bf718830e1afe41885fccaccd (patch)
tree57a04f7ff5a0e4127263da0f8673570fefdc6dd0 /src/libmsc/smpp_openbsc.c
parentf5816f6f5b8a7bff0c1f7b264af14b9760d86191 (diff)
smpp: Fix compilation warning
I already stumbled into 2 compilation environments which had Werror enabled for -Wmaybe-uninitialized and the build failed, so let's workaround this warning. | smpp_openbsc.c: In function 'handle_smpp_submit': | smpp_openbsc.c:216:9: error: 'sms_msg_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] | memcpy(sms->user_data, sms_msg, sms_msg_len); | ^ | smpp_openbsc.c:100:15: note: 'sms_msg_len' was declared here | unsigned int sms_msg_len; | ^ | cc1: some warnings being treated as errors Change-Id: I0901ddadb5f72e1585cb1797ac22c8ab95e83146
Diffstat (limited to 'src/libmsc/smpp_openbsc.c')
-rw-r--r--src/libmsc/smpp_openbsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index c2f2f3bca..ec1489820 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -94,11 +94,11 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
const struct submit_sm_t *submit)
{
const uint8_t *sms_msg = NULL;
+ unsigned int sms_msg_len = 0;
struct vlr_subscr *dest;
uint16_t msg_ref = 0;
struct gsm_sms *sms;
struct tlv_t *t;
- unsigned int sms_msg_len;
int mode;
dest = subscr_by_dst(net, submit->dest_addr_npi,