srsran / srsRAN_4G

Open source SDR 4G software suite from Software Radio Systems (SRS) https://docs.srsran.com/projects/4g
https://www.srsran.com
GNU Affero General Public License v3.0
3.36k stars 1.1k forks source link

various array subscript bounds warnings on Fedora 39 #1340

Open jgiovatto opened 1 month ago

jgiovatto commented 1 month ago

Hi Folks

Compiling on Fedora 39 gcc version 13.2.1 20240316 (Red Hat 13.2.1-7) (GCC)

srsue/src/phy/phy_common.cc:934:21: /usr/include/c++/13/array:203:24: error: array subscript 5 is above array bounds of ‘std::__array_traits<float, 5>::_Type’ {aka ‘float [5]’} [-Werror=array-bounds=]

I'd suggest the following:

Im not sure what to do with these ...

lib/test/asn1/srsran_asn1_rrc_meas_test.cc:183:42: /usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void __builtin_memmove(void, const void*, long unsigned int)’ forming offset 3 is out of the bounds [0, 3] [-Werror=array-bounds=]

lib/test/asn1/srsran_asn1_rrc_meas_test.cc:194:57: /usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void __builtin_memmove(void, const void*, long unsigned int)’ forming offset 36 is out of the bounds [0, 36] [-Werror=array-bounds=]

ib/test/asn1/rrc_nr_utils_test.cc:809:76: /usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void __builtin_memmove(void, const void*, long unsigned int)’ forming offset 16 is out of the bounds [0, 16] [-Werror=array-bounds=]