Avoid uninitialized variable btilde
Pre-initialize this variable. It should be set in pucch2x_scrambling(),
but the compiler warns with
In function ‘pucch2x_modulation’,
inlined from ‘generate_pucch2x’ at oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:425:3:
oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:361:18: warning: ‘btilde’ may be used uninitialized [-Wmaybe-uninitialized]
361 | d[i] = btilde[i] == 1 ? -amp : amp;
oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c: In function ‘generate_pucch2x’:
oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:387:11: note: ‘btilde’ declared here
387 | uint8_t btilde[20];
This commit is contained in:
@@ -384,7 +384,7 @@ void generate_pucch2x(int32_t **txdataF,
|
||||
|
||||
int i,j;
|
||||
uint32_t B=0;
|
||||
uint8_t btilde[20];
|
||||
uint8_t btilde[20] = {0};
|
||||
int16_t d[22];
|
||||
uint8_t deltaPUCCH_Shift = fp->pucch_config_common.deltaPUCCH_Shift;
|
||||
uint8_t NRB2 = fp->pucch_config_common.nRB_CQI;
|
||||
|
||||
Reference in New Issue
Block a user