INFO: No output directory specified (--dir) INFO: Using directory: "Granroth_SNS_decoupled_poisoned_20250814_115348" INFO: Regenerating c-file: Granroth_SNS_decoupled_poisoned.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Granroth_SNS_decoupled_poisoned.c Granroth_SNS_decoupled_poisoned.instr Info: 'SNS_source' is a contributed component. CFLAGS= ----------------------------------------------------------- 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: ./Granroth_SNS_decoupled_poisoned.c DEBUG: CMD: cppcheck ./Granroth_SNS_decoupled_poisoned.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 Granroth_SNS_decoupled_poisoned.c ... Checking Granroth_SNS_decoupled_poisoned.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... Granroth_SNS_decoupled_poisoned.c:7015: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)){ ^ Granroth_SNS_decoupled_poisoned.c:7007:16: note: Assuming allocation function fails line=malloc(200*sizeof(char)); ^ Granroth_SNS_decoupled_poisoned.c:7007:16: note: Assignment 'line=malloc(200*sizeof(char))', assigned value is 0 line=malloc(200*sizeof(char)); ^ Granroth_SNS_decoupled_poisoned.c:7011:11: note: Assuming condition is false if (fp==NULL){ ^ Granroth_SNS_decoupled_poisoned.c:7015:18: note: Null pointer dereference while((fgets(line,Maxlength,fp)!=NULL)&&(strchr(line,'#')!=NULL)){ ^ Granroth_SNS_decoupled_poisoned.c:7922:5: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] Imat[idx1]=malloc(500*sizeof(double)); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7922:5: note: Null pointer dereference Imat[idx1]=malloc(500*sizeof(double)); ^ Granroth_SNS_decoupled_poisoned.c:7938:12: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] tyval[0]=Imat[0][0]; ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7938:12: note: Null pointer dereference tyval[0]=Imat[0][0]; ^ Granroth_SNS_decoupled_poisoned.c:7944:21: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] tyval[idx2]=Imat[idx2][idx1]; ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7944:21: note: Null pointer dereference tyval[idx2]=Imat[idx2][idx1]; ^ Granroth_SNS_decoupled_poisoned.c:7960:10: warning: If memory allocation fails, then there is a possible null pointer dereference: Imat [nullPointerOutOfMemory] free(Imat[idx1]); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assuming allocation function fails Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7920:14: note: Assignment 'Imat=malloc(200*sizeof(double*))', assigned value is 0 Imat=malloc(200*sizeof(double*)); ^ Granroth_SNS_decoupled_poisoned.c:7960:10: note: Null pointer dereference free(Imat[idx1]); ^ Granroth_SNS_decoupled_poisoned.c:7086:12: warning: Uninitialized variable: idx3max [uninitvar] *ntvals=idx3max+1;*nEvals=idx2; ^ Granroth_SNS_decoupled_poisoned.c:7070:15: note: Assuming condition is false while(idx1