Fix integer overflow

Avoid UBSan error:
  openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:246:18: runtime error: signed integer overflow: 1457321472 + 922889664 cannot be represented in type 'int'
This commit is contained in:
Jaroslava Fiedlerova
2024-06-12 10:29:50 +02:00
parent 516b91fc90
commit b17354b74f
@@ -203,7 +203,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
unsigned char symbol,
uint8_t nrOfLayers)
{
int rx_power_tot = 0;
uint32_t rx_power_tot = 0;
unsigned short rx_power_avg_dB;
unsigned short rx_power_tot_dB;
RU_t *ru = gNB->RU_list[0];