INFO: No output directory specified (--dir) INFO: Using directory: "Tools_ONION_20250814_032128" INFO: Regenerating c-file: Tools_ONION.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Tools_ONION.c Tools_ONION.instr Info: 'SNS_source' is a contributed component. CFLAGS= -DLOADPATH=GETPATH(data) @NEXUSFLAGS@ ----------------------------------------------------------- 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: ./Tools_ONION.c --> pointing path data to /home/willend/micromamba/share/mcstas/resources/data DEBUG: CMD: cppcheck ./Tools_ONION.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 Tools_ONION.c ... Checking Tools_ONION.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... Tools_ONION.c:7017:18: warning: If memory allocation fails, then there is a possible null pointer dereference: line [nullPointerOutOfMemory] while((fgets(line,Maxlength,fp)!=NULL)&&(strchr(line,'#')!=NULL)){ ^ Tools_ONION.c:7009:16: note: Assuming allocation function fails line=malloc(200*sizeof(char)); ^ Tools_ONION.c:7009:16: note: Assignment 'line=malloc(200*sizeof(char))', assigned value is 0 line=malloc(200*sizeof(char)); ^ Tools_ONION.c:7013:11: note: Assuming condition is false if (fp==NULL){ ^ Tools_ONION.c:7017:18: note: Null pointer dereference while((fgets(line,Maxlength,fp)!=NULL)&&(strchr(line,'#')!=NULL)){ ^ Tools_ONION.c:14623:5: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] Imat[idx1]=malloc(500*sizeof(double)); ^ Tools_ONION.c:14621:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14621:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14623:5: note: Null pointer dereference Imat[idx1]=malloc(500*sizeof(double)); ^ Tools_ONION.c:14639:12: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] tyval[0]=Imat[0][0]; ^ Tools_ONION.c:14621:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14621:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14639:12: note: Null pointer dereference tyval[0]=Imat[0][0]; ^ Tools_ONION.c:14645:21: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] tyval[idx2]=Imat[idx2][idx1]; ^ Tools_ONION.c:14621:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14621:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14645:21: note: Null pointer dereference tyval[idx2]=Imat[idx2][idx1]; ^ Tools_ONION.c:14661:10: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] free(Imat[idx1]); ^ Tools_ONION.c:14621:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14621:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Tools_ONION.c:14661:10: note: Null pointer dereference free(Imat[idx1]); ^ Tools_ONION.c:7088:12: warning: Uninitialized variable: idx3max [uninitvar] *ntvals=idx3max+1;*nEvals=idx2; ^ Tools_ONION.c:7072:15: note: Assuming condition is false while(idx1