Fix build error when -g is specified, fix various warnings when -g is specified
This commit is contained in:
committed by
Robert Schmidt
parent
31b51b285a
commit
392040a842
+1
-1
@@ -278,7 +278,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ggdb2 -Wl,-rpath -Wl,${C
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
set(debugOpt "-ggdb2 -DMALLOC_CHECK_=3 -fno-delete-null-pointer-checks")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${debugOpt} -O0")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${debugOpt} -Og")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${debugOpt} -O2")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ void log_getconfig(log_t *g_log)
|
||||
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
if(g_log->log_component[i].name == NULL) {
|
||||
g_log->log_component[i].name = malloc(16);
|
||||
g_log->log_component[i].name = malloc(17);
|
||||
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
||||
logparams_logfile[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
logparams_level[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
|
||||
@@ -194,9 +194,9 @@ int init_codebook_gNB(PHY_VARS_gNB *gNB) {
|
||||
}
|
||||
}
|
||||
|
||||
int llc;
|
||||
int mmc;
|
||||
double complex phase_sign;
|
||||
int llc = 0;
|
||||
int mmc = 0;
|
||||
double complex phase_sign = 0;
|
||||
//Table 5.2.2.2.1-6:
|
||||
//Codebook for 2-layer CSI reporting using antenna ports 3000 to 2999+PCSI-RS
|
||||
//Compute the code book size for generating 2 layers out of Tx antenna ports
|
||||
|
||||
@@ -205,7 +205,7 @@ void pdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint32_t length) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
//LOG_D(PHY, "%s(fp, subframe:%d, e, length:%d)\n", __FUNCTION__, subframe, length);
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
@@ -56,7 +56,7 @@ void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
|
||||
void mpdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, mDCI_ALLOC_t *mdci, uint16_t i, uint8_t *e, uint32_t length) {
|
||||
int n;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0 = mdci->i0;
|
||||
@@ -266,7 +266,7 @@ void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe, int16_t amp,
|
||||
int i;
|
||||
int gain_lin_QPSK;
|
||||
uint16_t *mpdcchtab;
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0;
|
||||
|
||||
@@ -39,7 +39,7 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
|
||||
|
||||
uint8_t ns;
|
||||
uint8_t reset=1;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
// This is from Section 5.5.1.3
|
||||
uint32_t fss_pusch = frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH;
|
||||
|
||||
@@ -113,7 +113,7 @@ void generate_nPRS(LTE_DL_FRAME_PARMS *frame_parms)
|
||||
|
||||
uint16_t n=0;
|
||||
uint8_t reset=1;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
// This is from Section 5.5.1.3
|
||||
uint8_t Nsymb_UL = (frame_parms->Ncp_UL == NORMAL) ? 7 : 6;
|
||||
uint16_t next = 0;
|
||||
|
||||
@@ -146,7 +146,7 @@ void pbch_scrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
{
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
@@ -425,7 +425,7 @@ void pbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
{
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
@@ -41,7 +41,7 @@ void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7])
|
||||
{
|
||||
|
||||
uint8_t ns,l,reset=1,i,N_UL_symb;
|
||||
uint32_t x1,x2,j=0,s=0;
|
||||
uint32_t x1 = 0, x2 = 0, j = 0, s = 0;
|
||||
|
||||
N_UL_symb = (frame_parms->Ncp==0) ? 7 : 6;
|
||||
x2 = frame_parms->Nid_cell;
|
||||
|
||||
@@ -1505,7 +1505,7 @@ void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
|
||||
@@ -360,7 +360,7 @@ void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t frame_mod4) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.6.1
|
||||
@@ -564,7 +564,7 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t frame_mod4) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell+(1<<9); //this is c_init for FeMBMS in 36.211 Sec 6.6.1
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
|
||||
{
|
||||
unsigned int x1, x2;
|
||||
unsigned int x1 = 0, x2 = 0;
|
||||
uint16_t Nid, i_ssb, i_ssb2;
|
||||
unsigned char Lmax, l, n_hf, N_hf;
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||
@@ -55,8 +55,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
|
||||
|
||||
void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
|
||||
{
|
||||
|
||||
uint32_t x1, x2;
|
||||
uint32_t x1 = 0, x2 = 0;
|
||||
uint8_t reset;
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs;
|
||||
@@ -79,8 +78,7 @@ void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
|
||||
|
||||
|
||||
void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint8_t nscid, uint32_t Nid) {
|
||||
|
||||
uint32_t x1, x2;
|
||||
uint32_t x1 = 0, x2 = 0;
|
||||
uint8_t reset;
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
uint32_t ****pdsch_dmrs = gNB->nr_gold_pdsch_dmrs;
|
||||
@@ -104,7 +102,7 @@ void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint8_t nscid, uint32_t Nid) {
|
||||
void nr_gold_pusch(PHY_VARS_gNB* gNB, int nscid, uint32_t nid) {
|
||||
|
||||
unsigned char ns;
|
||||
unsigned int n,x1,x2;
|
||||
unsigned int n = 0, x1 = 0, x2 = 0;
|
||||
int reset;
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
unsigned short l;
|
||||
@@ -127,7 +125,7 @@ void nr_gold_pusch(PHY_VARS_gNB* gNB, int nscid, uint32_t nid) {
|
||||
|
||||
void nr_init_prs(PHY_VARS_gNB* gNB)
|
||||
{
|
||||
unsigned int x1, x2;
|
||||
unsigned int x1 = 0, x2 = 0;
|
||||
uint16_t Nid;
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
void nr_gold_pbch(PHY_VARS_NR_UE* ue)
|
||||
{
|
||||
unsigned int n, x1, x2;
|
||||
unsigned int n = 0, x1 = 0, x2 = 0;
|
||||
unsigned int Nid, i_ssb, i_ssb2;
|
||||
unsigned char Lmax, l, n_hf, N_hf;
|
||||
uint8_t reset;
|
||||
@@ -55,7 +55,7 @@ void nr_gold_pdcch(PHY_VARS_NR_UE* ue,
|
||||
unsigned short nid)
|
||||
{
|
||||
unsigned char ns,l;
|
||||
unsigned int n,x1,x2,x2tmp0;
|
||||
unsigned int n = 0, x1 = 0, x2 = 0, x2tmp0 = 0;
|
||||
uint8_t reset;
|
||||
int pdcch_dmrs_init_length = (((ue->frame_parms.N_RB_DL<<1)*3)>>5)+1;
|
||||
|
||||
@@ -78,8 +78,7 @@ void nr_gold_pdcch(PHY_VARS_NR_UE* ue,
|
||||
void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
|
||||
int nscid,
|
||||
uint32_t nid) {
|
||||
|
||||
unsigned int x1,x2,x2tmp0;
|
||||
unsigned int x1 = 0, x2 = 0, x2tmp0 = 0;
|
||||
uint8_t reset;
|
||||
int pdsch_dmrs_init_length = ((ue->frame_parms.N_RB_DL*12)>>5)+1;
|
||||
|
||||
@@ -104,7 +103,7 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
|
||||
uint16_t N_n_scid,
|
||||
uint8_t n_scid)
|
||||
{
|
||||
uint32_t x1, x2, n;
|
||||
uint32_t x1 = 0, x2 = 0, n = 0;
|
||||
uint8_t reset, slot, symb;
|
||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
uint32_t ****pusch_dmrs = ue->nr_gold_pusch_dmrs;
|
||||
@@ -127,7 +126,7 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
|
||||
|
||||
void init_nr_gold_prs(PHY_VARS_NR_UE* ue)
|
||||
{
|
||||
unsigned int x1, x2;
|
||||
unsigned int x1 = 0, x2 = 0;
|
||||
uint16_t Nid;
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
void nr_init_csi_rs(const NR_DL_FRAME_PARMS *fp, uint32_t ***csi_rs, uint32_t Nid) {
|
||||
uint32_t x1, x2;
|
||||
uint32_t x1 = 0, x2 = 0;
|
||||
uint8_t reset;
|
||||
int csi_dmrs_init_length = ((fp->N_RB_DL<<4)>>5)+1;
|
||||
for (uint8_t slot=0; slot<fp->slots_per_frame; slot++) {
|
||||
|
||||
@@ -47,7 +47,7 @@ void nr_pdcch_scrambling(uint32_t *in,
|
||||
uint32_t scrambling_RNTI,
|
||||
uint32_t *out) {
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
reset = 1;
|
||||
x2 = (scrambling_RNTI<<16) + Nid;
|
||||
LOG_D(PHY,"PDCCH Scrambling x2 %x : scrambling_RNTI %x \n", x2, scrambling_RNTI);
|
||||
|
||||
@@ -150,7 +150,7 @@ static void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
|
||||
uint8_t encoded,
|
||||
uint32_t unscrambling_mask) {
|
||||
uint8_t reset, offset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
uint32_t *pbch_e = pbch->pbch_e;
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
@@ -1254,7 +1254,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
// first compute DMRS component
|
||||
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
x2 = (((1<<17)*((14*slot) + (pucch_pdu->start_symbol_index+symb) + 1)*((2*pucch_pdu->dmrs_scrambling_id) + 1)) + (2*pucch_pdu->dmrs_scrambling_id))%(1U<<31); // c_init calculation according to TS38.211 subclause
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("slot %d, start_symbol_index %d, symbol %d, dmrs_scrambling_id %d\n",
|
||||
|
||||
@@ -804,7 +804,7 @@ void nr_pdcch_unscrambling(int16_t *e_rx,
|
||||
int16_t *z2) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
uint16_t n_id; //{0,1,...,65535}
|
||||
uint32_t rnti = (uint32_t) scrambling_RNTI;
|
||||
reset = 1;
|
||||
|
||||
@@ -312,7 +312,7 @@ static void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
|
||||
uint32_t pbch_a_prime,
|
||||
uint32_t *pbch_a_interleaved) {
|
||||
uint8_t reset, offset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
uint8_t k=0;
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
@@ -427,7 +427,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
&nr_ue_common_vars->rxdataF[0][(symbol_offset+1)*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size*3,1,1);
|
||||
#endif
|
||||
// symbol refers to symbol within SSB. symbol_offset is the offset of the SSB wrt start of slot
|
||||
double log2_maxh;
|
||||
double log2_maxh = 0;
|
||||
|
||||
for (symbol=1; symbol<4; symbol++) {
|
||||
const uint16_t nb_re=symbol == 2 ? 72 : 180;
|
||||
|
||||
@@ -62,7 +62,7 @@ void nr_pusch_codeword_scrambling_uci(uint8_t *in,
|
||||
uint32_t* out)
|
||||
{
|
||||
uint8_t reset, b_idx;
|
||||
uint32_t x1, x2, s=0, temp_out;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0, temp_out = 0;
|
||||
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + Nid;
|
||||
|
||||
@@ -807,7 +807,7 @@ void nr_generate_pucch1_old(PHY_VARS_NR_UE *ue,
|
||||
|
||||
static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) __attribute__((always_inline));
|
||||
static inline void nr_pucch2_3_4_scrambling(uint16_t M_bit,uint16_t rnti,uint16_t n_id,uint64_t *B64,uint8_t *btilde) {
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
int i;
|
||||
uint8_t c;
|
||||
// c_init=nRNTI*2^15+n_id according to TS 38.211 Subclause 6.3.2.6.1
|
||||
@@ -1037,7 +1037,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
|
||||
*/
|
||||
//int32_t *txptr;
|
||||
uint32_t re_offset=0;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint32_t x1 = 0, x2 = 0, s = 0;
|
||||
int i=0;
|
||||
int m=0;
|
||||
uint8_t startingSymbolIndex = pucch_pdu->start_symbol_index;
|
||||
|
||||
@@ -317,8 +317,8 @@ static void process_control_pdu(nr_rlc_entity_am_t *entity,
|
||||
int so_end;
|
||||
int range;
|
||||
int prev_nack_sn = -1;
|
||||
int prev_so_start;
|
||||
int prev_so_end;
|
||||
int prev_so_start = 0;
|
||||
int prev_so_end = 0;
|
||||
int tx_next_ack;
|
||||
nr_rlc_sdu_segment_t *cur_wait_list;
|
||||
nr_rlc_sdu_segment_t *prev_wait_list;
|
||||
|
||||
@@ -210,7 +210,9 @@ int as_message_encode(char* buffer, as_message_t* msg, int length)
|
||||
as_nas_info_t nas_msg;
|
||||
Byte_t *dataptr=NULL;
|
||||
uint32_t len=0;
|
||||
|
||||
|
||||
memset(&nas_msg, 0, sizeof(as_nas_info_t));
|
||||
|
||||
switch (msg->msgID) {
|
||||
case AS_BROADCAST_INFO_IND:
|
||||
/* Broadcast information */
|
||||
|
||||
Reference in New Issue
Block a user