Commit bf926e35 authored by Cedric Roux's avatar Cedric Roux

bugfix/warning removal

The warning was:

/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c: In function 'generate_pucch2x':
/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c:729:73: warning: array subscript is above array bounds [-Warray-bounds]
       AssertFatal(1==0,"Illegal modulation symbol %d for PUCCH %s\n",B2,pucch_format_string[fmt]);
/roux/ru/openairinterface5g/common/utils/./itti/assertions.h:52:53: note: in definition of macro '_Assert_'
                 __FUNCTION__, __FILE__, __LINE__, ##aRGS);  \
/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c:729:7: note: in expansion of macro 'AssertFatal'
       AssertFatal(1==0,"Illegal modulation symbol %d for PUCCH %s\n",B2,pucch_format_string[fmt]);
The root cause was that the array pucch_format_string was not in sync with
the structure. (This plus why force its size and put \0 in the string...)
parent f1e8bff3
......@@ -113,7 +113,18 @@ int16_t W3_im[3][6] = {{0 ,0 ,0 },
{0 ,-28378, 28377}
char pucch_format_string[6][20] = {"format 1\0","format 1a\0","format 1b\0","format 2\0","format 2a\0","format 2b\0"};
char *pucch_format_string[] = {
"format 1",
"format 1a",
"format 1b",
"format 2",
"format 2a",
"format 2b",
/* PUCCH format3 >> */
#define D_I 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment