mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
We don't enforce cppcheck through the CI, although it's there since years. It runs on Ubuntu 18/20, so it's old. For folks, it's likely not discoverable on how to run it locally. Let's make a fresh start. This removes cppcheck from all CI-related code. Instead, it adds it under tools/cppcheck/, including documentation on how to run it locally, bare-matel or in docker. Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
95 lines
5.5 KiB
Plaintext
95 lines
5.5 KiB
Plaintext
// *INDENT-OFF* cppcheck doesn't like "astyling" this file!!!!
|
|
// SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
// section for "valid" memory leaks: the related functions are allocators and
|
|
// the caller is responsible of freeing the memory. cppcheck has a mechanism
|
|
// to check more accuretaly this, by defining callers responsible of freeing
|
|
// but tools like valgring might be more suitable
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
// suppress error about keysP memory leak, free must be done by calling func
|
|
memleak:common/utils/hashtable/obj_hashtable.c
|
|
//-----------------------------------------------------------------------------
|
|
// suppress error about keys memory leak, free must be done by calling func
|
|
memleak:openair2/UTIL/OMG/omg_hashtable.c
|
|
//-----------------------------------------------------------------------------
|
|
// suppress error about data memory leak. This is the buffer where
|
|
// _emm_as_encode function creates the encoded buffer
|
|
//
|
|
memleak:openair3/NAS/UE/EMM/SAP/emm_as.c
|
|
memleak:openair1/PHY/INIT/nr_init_ue.c
|
|
//-----------------------------------------------------------------------------
|
|
//*****************************************************************************
|
|
// section for files not used in oai exec's included in CI.
|
|
// Possibly candidates for removal otherwise should be documented and updated
|
|
// for project rules enforcement
|
|
// ----------------------------------------------------------------------------
|
|
// likely sources for test programs, maintained?
|
|
invalidPrintfArgType_sint:openair1/PHY/CODING/TESTBENCH/ltetest.c
|
|
memleak:openair1/PHY/CODING/TESTBENCH/ltetest.c
|
|
invalidPrintfArgType_sint:openair1/PHY/CODING/TESTBENCH/pdcch_test.c
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
// is itti analyzer deprecated
|
|
nullPointer:common/utils/itti_analyzer/itti_analyzer.c
|
|
nullPointerRedundantCheck:common/utils/itti_analyzer/libbuffers/buffers.c
|
|
doubleFree:common/utils/itti_analyzer/libbuffers/socket.c
|
|
memleak:common/utils/itti_analyzer/libbuffers/socket.c
|
|
memleak:common/utils/itti_analyzer/libparser/array_type.c
|
|
memleak:common/utils/itti_analyzer/libui/ui_callbacks.c
|
|
//-----------------------------------------------------------------------------
|
|
// obviously never even compiled!!!
|
|
syntaxError:openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
|
|
//-----------------------------------------------------------------------------
|
|
// omg, otg commented out in cmakelist to be cleaned up definitely?
|
|
arrayIndexOutOfBounds:openair2/UTIL/OMG/omg.c
|
|
uninitvar:openair2/UTIL/OTG/otg_rx_socket.c
|
|
//-----------------------------------------------------------------------------
|
|
// cppcheck is not able to understand that buf is initialized at the first
|
|
// iteration of the loop.
|
|
nullPointer:common/utils/T/local_tracer.c:243
|
|
//-----------------------------------------------------------------------------
|
|
// once again cppcheck does not understand that fds is initialized in the
|
|
// first iteration of the loop
|
|
nullPointer:common/utils/T/tracer/multi.c:264
|
|
nullPointer:common/utils/T/tracer/multi.c:265
|
|
//-----------------------------------------------------------------------------
|
|
// this file is used for testing the RLC V2 implementation, this error is
|
|
// not a problem, the programmer has to know what she does when writing
|
|
// the tests
|
|
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
// this file is used for testing the NR RLC implementation, this error is
|
|
// not a problem, the programmer has to know what she does when writing
|
|
// the tests
|
|
arrayIndexOutOfBounds:openair2/LAYER2/nr_rlc/tests/test.c:451
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
// cppcheck does not understand the different lengths of arrays
|
|
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:705
|
|
arrayIndexOutOfBounds:openair1/SIMULATION/TOOLS/random_channel.c:706
|
|
//*****************************************************************************
|
|
//
|
|
// True problems we don't know how to fix, Suppression is commented out,
|
|
// as these kind of problem need either to be fixed or can be suppressed
|
|
// when fully uderstood
|
|
//-----------------------------------------------------------------------------
|
|
// the function [nv]fapi_pnf_p7_config_create should return
|
|
// _this. _this points to a structure and a dynamically allocated field is
|
|
// returned. cppcheck suspects _this will never be released, so do i
|
|
// memleak:nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
|
|
// memleak:nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
|
|
//-----------------------------------------------------------------------------
|
|
// may be security_data->kenb.value is released from calling functions. But even
|
|
// when, for test, freeing it before returning from emm_proc_security_mode_command
|
|
// which does the allocation, cppcheck complains. So something might be wrong...
|
|
// memleak:openair3/NAS/UE/EMM/SecurityModeControl.c
|
|
//-----------------------------------------------------------------------------
|
|
// when used, nobody but the original developer can guess if sn_data_cnf is set or not
|
|
// cppcheck found that in some cases it is not, code needs cleanup before fixing that...
|
|
// uninitvar:openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
|
|
//*****************************************************************************
|
|
// *INDENT-ON*
|