diff --git a/ci-scripts/cppcheck_suppressions.list b/ci-scripts/cppcheck_suppressions.list index d5aea7ae9d..007d8555e2 100644 --- a/ci-scripts/cppcheck_suppressions.list +++ b/ci-scripts/cppcheck_suppressions.list @@ -67,6 +67,15 @@ 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 is not to 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 // //***************************************************************************** // diff --git a/common/utils/T/local_tracer.c b/common/utils/T/local_tracer.c index 7341db4576..4be0b35d16 100644 --- a/common/utils/T/local_tracer.c +++ b/common/utils/T/local_tracer.c @@ -240,8 +240,7 @@ again: if (len <= 0) goto dead; - if (buf != NULL) - PUT(t); + PUT(t); switch (t) { case 0: diff --git a/common/utils/T/tracer/multi.c b/common/utils/T/tracer/multi.c index a381567eb3..6a9de838c6 100644 --- a/common/utils/T/tracer/multi.c +++ b/common/utils/T/tracer/multi.c @@ -261,7 +261,6 @@ int main(int n, char **v) if (fds == NULL) { perror("calloc"); exit(1); } } i = 0; - if (fds == NULL) { perror("null fds pointer"); exit(1); } fds[i].fd = l; fds[i].events = POLLIN; i++; diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index 18132176a7..f83cc7efd3 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -195,10 +195,8 @@ int main(int n, char **v) handle_event(h, e); } - if (on_off_name != NULL) - free(on_off_name); - if (on_off_action != NULL) - free(on_off_action); + free(on_off_name); + free(on_off_action); return 0; }