Loading
Commits on Source 5
-
Raphael Defosseux authored
Signed-off-by:Raphael Defosseux <raphael.defosseux@openairinterface.org>
-
mir authored
-
Robert Schmidt authored
call_process_id is a byte_string_t, but prior to this commit, we allocate data->len_cpid, which is likely not the right size; instead, use the sizeof operator to calculate the right size. This prevents one of these warnings, depending on compiler (version): /home/richie/flexric/src/agent/e2_agent.c: In function ‘generate_aindication’: /home/richie/flexric/src/agent/e2_agent.c:56:25: warning: allocation of insufficient size ‘8’ for type ‘byte_array_t’ with size ‘16’ [-Walloc-size] 56 | ind.call_process_id = malloc(sizeof(data->len_cpid) ); | ^ /oai-ran/openair2/E2AP/flexric/src/agent/e2_agent.c:58:30: error: array subscript 'byte_array_t[0]' is partly outside array bounds of 'unsigned char[8]' [-Werror=array-bounds] 59 | ind.call_process_id->buf = data->call_process_id; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /oai-ran/openair2/E2AP/flexric/src/agent/e2_agent.c:56:27: note: object of size 8 allocated by 'malloc' -
Robert Schmidt authored
gcc-14 warns when using FORTIFY_SOURCE in debug builds: /usr/include/features.h:414:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] 414 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ Use it in release builds instead. -
Mikel Irazabal authored
Fix warnings that appear when compiling dev branch with gcc-14 in debug mode See merge request !49