Fixing cppcheck issues
This commit is contained in:
@@ -246,7 +246,7 @@ int write_file_matlab(const char *fname,
|
||||
fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "unknown dump format: %d\n", format);
|
||||
AssertFatal(false, "unknown dump format: %u\n", format);
|
||||
}
|
||||
|
||||
if (format != 10 && format !=11 && format !=12 && format != 13 && format != 15) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _T_T_T_
|
||||
#define _T_T_T_
|
||||
|
||||
#if T_TRACER
|
||||
#if T_TRACER && !defined(__cppcheck__)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -339,6 +339,7 @@ extern "C" {
|
||||
int itti_create_queue(const task_info_t *taskInfo) {
|
||||
pthread_mutex_lock (&lock_nb_queues);
|
||||
int newQueue=nb_queues++;
|
||||
// cppcheck-suppress memleakOnRealloc
|
||||
AssertFatal(tasks=(task_list_t **) realloc(tasks, nb_queues * sizeof(*tasks)),"");
|
||||
tasks[newQueue]= new task_list_t;
|
||||
pthread_mutex_unlock (&lock_nb_queues);
|
||||
|
||||
@@ -44,6 +44,7 @@ nfapi_pnf_p7_config_t* nfapi_pnf_p7_config_create()
|
||||
_this->_public.codec_config.allocate = &malloc;
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
// cppcheck-suppress memleak
|
||||
return &(_this->_public);
|
||||
}
|
||||
|
||||
|
||||
@@ -2923,6 +2923,9 @@ int allocate_REs_in_RB_MCH_khz_1dot25(int32_t **txdataF,
|
||||
uint8_t skip_dc,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
if (!qam_table_s)
|
||||
abort();
|
||||
|
||||
uint32_t tti_offset;
|
||||
uint8_t re,offset;
|
||||
uint8_t qam64_table_offset_re = 0;
|
||||
|
||||
@@ -242,7 +242,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in
|
||||
for (int pix=0; pix<graph->w; pix++) {
|
||||
scopeSample_t *end=values+(pix+1)*samplesPerPixel;
|
||||
end-=2;
|
||||
AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize);
|
||||
AssertFatal(end <= values+datasize,"diff : %tu", end-values+datasize);
|
||||
double val=0;
|
||||
|
||||
for (scopeSample_t *s=values+(pix)*samplesPerPixel;
|
||||
|
||||
@@ -3686,6 +3686,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
if ( (proc->sub_frame_start+1)%RX_NB_TH == 1 && threads.slot1_proc_two != -1 )
|
||||
CPU_SET(threads.slot1_proc_two, &cpuset);
|
||||
|
||||
// cppcheck-suppress moduloAlwaysTrueFalse
|
||||
if ( (proc->sub_frame_start+1)%RX_NB_TH == 2 && threads.slot1_proc_three != -1 )
|
||||
CPU_SET(threads.slot1_proc_three, &cpuset);
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES;
|
||||
#endif
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
int nsamps2 = (payload_size>>4)+1
|
||||
int nsamps2 = (payload_size>>4)+1;
|
||||
int16x8_t temp_rx[nsamps2];
|
||||
char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user