diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-15 13:00:35 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-16 09:16:19 +0000 |
commit | 69e356be93c420b5e2f8b96fbc89ef889cbcfe53 (patch) | |
tree | e48a5f369b1fd57871fbbea678010d767a1f445f /src/gprs/gprs_gmm.c | |
parent | 5343a8c0d3384a56b82636aecdfcd42b6eda2c0a (diff) |
compiler warnings: use enum ranap_nsap_addr_enc, constify local var
Use the proper enum ranap_nsap_addr_enc instead of int, and properly exclude
that member when we're building without Iu support:
sgsn_vty.c:1323:31: error: passing argument 2 of ‘ranap_iu_vty_init’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ranap_iu_vty_init(SGSN_NODE, &g_cfg->iu.rab_assign_addr_enc);
Add const to a local var to silence compiler warning retrieving TLVP_VAL:
gprs_gmm.c:1657:18: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
uint8_t *mi = TLVP_VAL(&tp, GSM48_IE_GMM_ALLOC_PTMSI);
^~~~~~~~
Change-Id: I1168ce6425c31db3f6c3bf1f3682ae96b028c59b
Diffstat (limited to 'src/gprs/gprs_gmm.c')
-rw-r--r-- | src/gprs/gprs_gmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index c9fb8da8a..ff993cc26 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1654,7 +1654,7 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, /* In Iu mode search only for ptmsi */ char mi_string[GSM48_MI_SIZE]; uint8_t mi_len = TLVP_LEN(&tp, GSM48_IE_GMM_ALLOC_PTMSI); - uint8_t *mi = TLVP_VAL(&tp, GSM48_IE_GMM_ALLOC_PTMSI); + const uint8_t *mi = TLVP_VAL(&tp, GSM48_IE_GMM_ALLOC_PTMSI); uint8_t mi_type = *mi & GSM_MI_TYPE_MASK; uint32_t tmsi; |