Fix some sizeof and switch-case errors reported by CodeChecker
CodeChecker is a python application that collects reports from static analyzers like clang-tidy, clangsa, cppcheck.
This commit is contained in:
@@ -1662,7 +1662,7 @@ void extract_BEARER_CONTEXT_RELEASE_COMMAND(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
||||
if ((ie->value.choice.Cause.present != E1AP_Cause_PR_NOTHING) &&
|
||||
(ie->value.choice.Cause.present != E1AP_Cause_PR_choice_extension))
|
||||
bearerCxt->cause = ie->value.choice.Cause.choice.radioNetwork;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n");
|
||||
|
||||
@@ -1901,6 +1901,7 @@ static uint32_t nr_get_sf_periodicBSRTimer(long periodicBSR)
|
||||
break;
|
||||
case NR_BSR_Config__periodicBSR_Timer_infinity:
|
||||
timer = UINT_MAX;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "Invalid periodicBSR_Timer %ld\n", periodicBSR);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ void clear_nr_nfapi_information(gNB_MAC_INST *gNB,
|
||||
}
|
||||
free(future_ul_tti_req->pdus_list[i].srs_pdu.beamforming.prgs_list);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
pdsch->mcs = 0; // starting from mcs 0
|
||||
gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
|
||||
|
||||
uint8_t nr_of_candidates;
|
||||
uint8_t nr_of_candidates = 0;
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
find_aggregation_candidates(&gNB_mac->sched_ctrlCommon->aggregation_level, &nr_of_candidates, gNB_mac->sched_ctrlCommon->search_space,4<<i);
|
||||
|
||||
@@ -776,7 +776,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
||||
pc5s_header->destinationL2Id=destinationL2Id;
|
||||
}
|
||||
} /* end of !ctxt.enb_flag */
|
||||
|
||||
break;
|
||||
default:
|
||||
LOG_D(PDCP, "pc5s message type %d, unknown...\n", pc5s_header->traffic_type);
|
||||
break;
|
||||
|
||||
@@ -1376,7 +1376,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCCH_Update_Time */ //long
|
||||
ie=(M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1,sizeof(M2AP_MbmsSchedulingInformation_Ies_t));
|
||||
ie = calloc(1, sizeof(*ie));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MCCH_Update_Time;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time;
|
||||
@@ -1388,7 +1388,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCE_MBMS_M2AP_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t));
|
||||
ie = calloc(1, sizeof(*ie));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID;
|
||||
@@ -1397,7 +1397,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
|
||||
|
||||
/* mandatory */
|
||||
/* c2. TMGI (integrer value) */
|
||||
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t ));
|
||||
ie = calloc(1, sizeof(*ie));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Request_Session;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session;
|
||||
|
||||
@@ -215,7 +215,7 @@ static void prepare_NR_SL_BWPConfigCommon(NR_SL_BWP_ConfigCommon_r16_t *sl_bwp,
|
||||
// Value can be between symbols 0 to 7
|
||||
sl_bwp->sl_BWP_Generic_r16->sl_StartSymbol_r16 = calloc(1, sizeof(long));
|
||||
|
||||
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16 = calloc(1,sizeof(NR_SL_PSBCH_Config_r16_t));
|
||||
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16));
|
||||
// PSBCH CONFIG contains PO and alpha for PSBCH powercontrol.
|
||||
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16->present = NR_SetupRelease_SL_PSBCH_Config_r16_PR_release;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user