gmm: Fix false positive compilation error with gcc 13.1.1
Newer gcc errors about "cause" being uninitialized, but cause is guaranteed to be set in the "case GPRS_GMM_MS_EV_LOW_LVL_FAIL" path, it just fails to find out. Since the approach used previously is a bit hacky, let's simplify it. Change-Id: I1c96b0aa92d4f9205a1d4d1760c787fe0e0ed169
This commit is contained in:
parent
5913437a0c
commit
f9f7bd31c3
|
@ -102,7 +102,7 @@ static void st_gmm_ms_deregistered(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
static void st_gmm_ms_registered_initiated(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
||||
{
|
||||
struct gprs_gmm_ms_fsm_ctx *ctx = (struct gprs_gmm_ms_fsm_ctx *)fi->priv;
|
||||
uint8_t cause;
|
||||
uint8_t cause = GMM_CAUSE_MAC_FAIL;
|
||||
int rc;
|
||||
struct gprs_gmm_ms_fsm_attach_ctx att;
|
||||
|
||||
|
@ -120,9 +120,6 @@ static void st_gmm_ms_registered_initiated(struct osmo_fsm_inst *fi, uint32_t ev
|
|||
memcpy(&att, &ctx->attach, sizeof(att));
|
||||
gmm_ms_fsm_state_chg(fi, GPRS_GMM_MS_ST_DEREGISTERED);
|
||||
|
||||
if (event == GPRS_GMM_MS_EV_LOW_LVL_FAIL)
|
||||
cause = GMM_CAUSE_MAC_FAIL;
|
||||
|
||||
if (att.explicit_att) {
|
||||
/* Submit GMMREG-ATTACH-REJ as per TS 24.007 Annex C.1 */
|
||||
rc = gprs_gmm_submit_gmmreg_attach_cnf(ctx->gmme, false, cause);
|
||||
|
|
Loading…
Reference in New Issue