INFO: No output directory specified (--dir) INFO: Using directory: "Test_Pol_Tabled_20250815_075314" INFO: Regenerating c-file: Test_Pol_Tabled.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Test_Pol_Tabled.c Test_Pol_Tabled.instr CFLAGS= -DUSE_OFF ----------------------------------------------------------- Generating single GPU kernel or single CPU section layout: ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: ----------------------------------------------------------- DEBUG: CMD: /home/willend/micromamba/bin/mcstas finished INFO: Linting generated code: ./Test_Pol_Tabled.c DEBUG: CMD: cppcheck ./Test_Pol_Tabled.c --check-level=exhaustive --force -DMCDEFAULT_NCOUNT=1000000 -UMC_PORTABLE -DND_BUFFER=10000000 -UNOABSORB_INF_NAN -UOMPI_MPI_H -DSIGABRT -DSIGBREAK -DSIGBUS -DSIGPE -DSIGHUP -DSIGILL -DSIGINT -DSIGKILL -DSIGUSR1 -DSIGUSR2 -DSIGPIPE -DSIGQUIT -DSIGSEGV -DSIGTRAP -DSIGURG -DSIGFPE -DSIGKILL -DSIGTERM -UTEST -UUSE_OPENCL -UWIN32 -UOPENACC -UGCCOFFLOAD -U_MSC_VER -U_MSC_EXTENSIONS -U_WIN32 -UWIN32 -D__unix__ -UDANSE -UFUNNEL -UMC_ANCIENT_COMPATIBILITY -UMC_POL_COMPAT -UNEUTRONICS -Uisnan -Uisinf Checking Test_Pol_Tabled.c ... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1... Test_Pol_Tabled.c:8924:3: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] node->depth = depth; ^ Test_Pol_Tabled.c:8923:26: note: Assuming allocation function fails treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8923:26: note: Assignment 'node=malloc(sizeof(struct treeNode))', assigned value is 0 treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8924:3: note: Null pointer dereference node->depth = depth; ^ Test_Pol_Tabled.c:8927:3: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] node->point = points[med]; ^ Test_Pol_Tabled.c:8923:26: note: Assuming allocation function fails treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8923:26: note: Assignment 'node=malloc(sizeof(struct treeNode))', assigned value is 0 treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8927:3: note: Null pointer dereference node->point = points[med]; ^ Test_Pol_Tabled.c:8929:3: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] node->lChild = kdtree_addToTree(points, left, med-1, depth + 1); ^ Test_Pol_Tabled.c:8923:26: note: Assuming allocation function fails treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8923:26: note: Assignment 'node=malloc(sizeof(struct treeNode))', assigned value is 0 treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8929:3: note: Null pointer dereference node->lChild = kdtree_addToTree(points, left, med-1, depth + 1); ^ Test_Pol_Tabled.c:8930:3: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] node->rChild = kdtree_addToTree(points, med+1, right, depth + 1); ^ Test_Pol_Tabled.c:8923:26: note: Assuming allocation function fails treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8923:26: note: Assignment 'node=malloc(sizeof(struct treeNode))', assigned value is 0 treeNode *node = malloc(sizeof(treeNode)); ^ Test_Pol_Tabled.c:8930:3: note: Null pointer dereference node->rChild = kdtree_addToTree(points, med+1, right, depth + 1); ^ Test_Pol_Tabled.c:9056:9: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] if (indices[i] < 0) indices[i]=0; ^ Test_Pol_Tabled.c:9338:27: note: Assuming allocation function fails long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9338:27: note: Assignment 'indices=malloc((int)interpolator->space_dimensionality*sizeof(double))', assigned value is 0 long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9342:60: note: Calling function 'interpolator_offset', 3rd argument 'indices' value is 0 long index = interpolator_offset(3, interpolator->bin, indices); ^ Test_Pol_Tabled.c:9056:9: note: Null pointer dereference if (indices[i] < 0) indices[i]=0; ^ Test_Pol_Tabled.c:9057:9: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] if (indices[i] >= dimInfo[i]) indices[i]=dimInfo[i]-1; ^ Test_Pol_Tabled.c:9338:27: note: Assuming allocation function fails long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9338:27: note: Assignment 'indices=malloc((int)interpolator->space_dimensionality*sizeof(double))', assigned value is 0 long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9342:60: note: Calling function 'interpolator_offset', 3rd argument 'indices' value is 0 long index = interpolator_offset(3, interpolator->bin, indices); ^ Test_Pol_Tabled.c:9057:9: note: Null pointer dereference if (indices[i] >= dimInfo[i]) indices[i]=dimInfo[i]-1; ^ Test_Pol_Tabled.c:9061:23: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] result = i == 0 ? indices[0] ^ Test_Pol_Tabled.c:9338:27: note: Assuming allocation function fails long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9338:27: note: Assignment 'indices=malloc((int)interpolator->space_dimensionality*sizeof(double))', assigned value is 0 long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9342:60: note: Calling function 'interpolator_offset', 3rd argument 'indices' value is 0 long index = interpolator_offset(3, interpolator->bin, indices); ^ Test_Pol_Tabled.c:9061:23: note: Null pointer dereference result = i == 0 ? indices[0] ^ Test_Pol_Tabled.c:9062:45: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] : result * dimInfo[i] + indices[i]; ^ Test_Pol_Tabled.c:9338:27: note: Assuming allocation function fails long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9338:27: note: Assignment 'indices=malloc((int)interpolator->space_dimensionality*sizeof(double))', assigned value is 0 long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9342:60: note: Calling function 'interpolator_offset', 3rd argument 'indices' value is 0 long index = interpolator_offset(3, interpolator->bin, indices); ^ Test_Pol_Tabled.c:9062:45: note: Null pointer dereference : result * dimInfo[i] + indices[i]; ^ Test_Pol_Tabled.c:9155:7: warning: If memory allocation fails, then there is a possible null pointer dereference: vector [nullPointerOutOfMemory] vector[index] = x; ^ Test_Pol_Tabled.c:9147:38: note: Assuming allocation function fails double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9147:22: note: Assignment 'vector=(double*)calloc(sizeof(double),table.rows)', assigned value is 0 double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9155:7: note: Null pointer dereference vector[index] = x; ^ Test_Pol_Tabled.c:9158:11: warning: If memory allocation fails, then there is a possible null pointer dereference: vector [nullPointerOutOfMemory] qsort(vector, table.rows, sizeof(double), interpolator_double_vector_compare); ^ Test_Pol_Tabled.c:9147:38: note: Assuming allocation function fails double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9147:22: note: Assignment 'vector=(double*)calloc(sizeof(double),table.rows)', assigned value is 0 double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9158:11: note: Null pointer dereference qsort(vector, table.rows, sizeof(double), interpolator_double_vector_compare); ^ Test_Pol_Tabled.c:9162:18: warning: If memory allocation fails, then there is a possible null pointer dereference: vector [nullPointerOutOfMemory] double x = vector[index]; ^ Test_Pol_Tabled.c:9147:38: note: Assuming allocation function fails double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9147:22: note: Assignment 'vector=(double*)calloc(sizeof(double),table.rows)', assigned value is 0 double* vector = (double*) calloc(sizeof(double), table.rows); ^ Test_Pol_Tabled.c:9162:18: note: Null pointer dereference double x = vector[index]; ^ Test_Pol_Tabled.c:9238:11: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] indices[axis] = round((x - interpolator->min[axis])/interpolator->step[axis]); ^ Test_Pol_Tabled.c:9231:31: note: Assuming allocation function fails long *indices = malloc(interpolator->space_dimensionality*sizeof(long)); ^ Test_Pol_Tabled.c:9231:31: note: Assignment 'indices=malloc(interpolator->space_dimensionality*sizeof(long))', assigned value is 0 long *indices = malloc(interpolator->space_dimensionality*sizeof(long)); ^ Test_Pol_Tabled.c:9238:11: note: Null pointer dereference indices[axis] = round((x - interpolator->min[axis])/interpolator->step[axis]); ^ Test_Pol_Tabled.c:9340:7: warning: If memory allocation fails, then there is a possible null pointer dereference: indices [nullPointerOutOfMemory] indices[axis] = round((space[axis]-interpolator->min[axis])/interpolator->step[axis]); ^ Test_Pol_Tabled.c:9338:27: note: Assuming allocation function fails long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9338:27: note: Assignment 'indices=malloc((int)interpolator->space_dimensionality*sizeof(double))', assigned value is 0 long *indices = malloc((int)interpolator->space_dimensionality*sizeof(double)); ^ Test_Pol_Tabled.c:9340:7: note: Null pointer dereference indices[axis] = round((space[axis]-interpolator->min[axis])/interpolator->step[axis]); ^ Test_Pol_Tabled.c:9064:10: warning: Uninitialized variable: result [uninitvar] return result; ^ Test_Pol_Tabled.c:9060:15: note: Assuming condition is false for (i=0; i < dim; i++) { ^ Test_Pol_Tabled.c:9064:10: note: Uninitialized variable: result return result; ^ Test_Pol_Tabled.c:9062:23: error: Uninitialized variable: result [legacyUninitvar] : result * dimInfo[i] + indices[i]; ^ Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;SIGKILL;SIGUSR1;SIGUSR2... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;USE_MPI... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;USE_MPI;USE_NEXUS... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;USE_NEXUS... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__APPLE__;__GNUC__... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__APPLE__;__unix__... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__FreeBSD__... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__GNUC__... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__GNUC__;__clang__... Checking Test_Pol_Tabled.c: MCDEFAULT_NCOUNT=1000000;ND_BUFFER=10000000;SIGABRT=1;SIGBREAK=1;SIGBUS=1;SIGPE=1;SIGHUP=1;SIGILL=1;SIGINT=1;SIGKILL=1;SIGUSR1=1;SIGUSR2=1;SIGPIPE=1;SIGQUIT=1;SIGSEGV=1;SIGTRAP=1;SIGURG=1;SIGFPE=1;SIGKILL=1;SIGTERM=1;__unix__=1;__dest_os... DEBUG: CMD: cppcheck finished INFO: End of linting ./Test_Pol_Tabled.c