INFO: No output directory specified (--dir) INFO: Using directory: "RTP_Laue_20250814_143047" INFO: Regenerating c-file: RTP_Laue.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./RTP_Laue.c RTP_Laue.instr ----------------------------------------------------------- WARNING: Existing (COPY) EXTEND block in COMPONENT image_plate_eff: EXTEND %{ /* take into account ZnS scintillator efficiency */ double eff=0.5; double v=sqrt(vx*vx+vy*vy+vz*vz); p *= 1.0-exp(3960.0/v*log(1.0-eff/100.0)); %} is overwritten by: EXTEND %{ %} ----------------------------------------------------------- ----------------------------------------------------------- WARNING: Existing (COPY) EXTEND block in COMPONENT image_plate_scattered: EXTEND %{ /* take into account ZnS scintillator efficiency */ double eff=0.5; double v=sqrt(vx*vx+vy*vy+vz*vz); p *= 1.0-exp(3960.0/v*log(1.0-eff/100.0)); %} is overwritten by: EXTEND %{ %} ----------------------------------------------------------- CFLAGS= WARNING: The parameter mosaic_AB of sample_outer1 is initialized using a static {,,,} vector. -> Such static vectors support literal numbers ONLY. -> Any vector use of variables or defines must happen via a DECLARE/INITIALIZE pointer. ----------------------------------------------------------- Generating single GPU kernel or single CPU section layout: -> SPLIT N at component sample_outer1 ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: -> SPLIT within buffer at component sample_outer1 ----------------------------------------------------------- DEBUG: CMD: /home/willend/micromamba/bin/mcstas finished INFO: Linting generated code: ./RTP_Laue.c DEBUG: CMD: cppcheck ./RTP_Laue.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 RTP_Laue.c ... Checking RTP_Laue.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... RTP_Laue.c:13469:16: error: Memory leak: OUTFILE [memleak] if (!file) return(NULL); ^ RTP_Laue.c:13718:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].h = h; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13718:7: note: Null pointer dereference list[i].h = h; ^ RTP_Laue.c:13719:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].k = k; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13719:7: note: Null pointer dereference list[i].k = k; ^ RTP_Laue.c:13720:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].l = l; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13720:7: note: Null pointer dereference list[i].l = l; ^ RTP_Laue.c:13721:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].F2 = F2; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13721:7: note: Null pointer dereference list[i].F2 = F2; ^ RTP_Laue.c:13724:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_x = h*info->asx + k*info->bsx + l*info->csx; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13724:7: note: Null pointer dereference list[i].tau_x = h*info->asx + k*info->bsx + l*info->csx; ^ RTP_Laue.c:13725:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_y = h*info->asy + k*info->bsy + l*info->csy; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13725:7: note: Null pointer dereference list[i].tau_y = h*info->asy + k*info->bsy + l*info->csy; ^ RTP_Laue.c:13726:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_z = h*info->asz + k*info->bsz + l*info->csz; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13726:7: note: Null pointer dereference list[i].tau_z = h*info->asz + k*info->bsz + l*info->csz; ^ RTP_Laue.c:13727:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13727:7: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13727:26: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13727:26: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13727:40: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13727:40: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ RTP_Laue.c:13728:26: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_y*list[i].tau_y + ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13728:26: note: Null pointer dereference list[i].tau_y*list[i].tau_y + ^ RTP_Laue.c:13728:40: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_y*list[i].tau_y + ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13728:40: note: Null pointer dereference list[i].tau_y*list[i].tau_y + ^ RTP_Laue.c:13729:26: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_z*list[i].tau_z); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13729:26: note: Null pointer dereference list[i].tau_z*list[i].tau_z); ^ RTP_Laue.c:13729:40: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_z*list[i].tau_z); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13729:40: note: Null pointer dereference list[i].tau_z*list[i].tau_z); ^ RTP_Laue.c:13730:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13730:7: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13730:21: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13730:21: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13730:35: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13730:35: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ RTP_Laue.c:13731:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13731:7: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13731:21: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13731:21: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13731:35: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13731:35: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ RTP_Laue.c:13732:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13732:7: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13732:21: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13732:21: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13732:35: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13732:35: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ RTP_Laue.c:13733:41: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] sig1 = FWHM2RMS*info->m_delta_d_d*list[i].tau; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13733:41: note: Null pointer dereference sig1 = FWHM2RMS*info->m_delta_d_d*list[i].tau; ^ RTP_Laue.c:13737:18: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13737:18: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13737:31: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13737:31: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13737:44: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13737:44: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ RTP_Laue.c:13738:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] vec_prod(b2[0], b2[1], b2[2], ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13738:7: note: Null pointer dereference vec_prod(b2[0], b2[1], b2[2], ^ RTP_Laue.c:13745:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2x = b1[0]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13745:9: note: Null pointer dereference list[i].u2x = b1[0]; ^ RTP_Laue.c:13746:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2y = b1[1]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13746:9: note: Null pointer dereference list[i].u2y = b1[1]; ^ RTP_Laue.c:13747:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2z = b1[2]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13747:9: note: Null pointer dereference list[i].u2z = b1[2]; ^ RTP_Laue.c:13748:25: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] sig2 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13748:25: note: Null pointer dereference sig2 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ RTP_Laue.c:13749:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3x = b2[0]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13749:9: note: Null pointer dereference list[i].u3x = b2[0]; ^ RTP_Laue.c:13750:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3y = b2[1]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13750:9: note: Null pointer dereference list[i].u3y = b2[1]; ^ RTP_Laue.c:13751:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3z = b2[2]; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13751:9: note: Null pointer dereference list[i].u3z = b2[2]; ^ RTP_Laue.c:13752:25: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] sig3 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13752:25: note: Null pointer dereference sig3 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ RTP_Laue.c:13870:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].sig123 = sig1*sig2*sig3; ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13870:7: note: Null pointer dereference list[i].sig123 = sig1*sig2*sig3; ^ RTP_Laue.c:13871:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m1 = 1/(2*sig1*sig1); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13871:7: note: Null pointer dereference list[i].m1 = 1/(2*sig1*sig1); ^ RTP_Laue.c:13872:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m2 = 1/(2*sig2*sig2); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13872:7: note: Null pointer dereference list[i].m2 = 1/(2*sig2*sig2); ^ RTP_Laue.c:13873:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m3 = 1/(2*sig3*sig3); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13873:7: note: Null pointer dereference list[i].m3 = 1/(2*sig3*sig3); ^ RTP_Laue.c:13889:11: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] qsort(list, i, sizeof(struct hkl_data), SX_list_compare); ^ RTP_Laue.c:13701:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13701:12: note: Assignment 'list=(struct hkl_data*)malloc(size*sizeof(struct hkl_data))', assigned value is 0 list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ RTP_Laue.c:13889:11: note: Null pointer dereference qsort(list, i, sizeof(struct hkl_data), SX_list_compare); ^ RTP_Laue.c:13843:14: error: Uninitialized variable: c1 [legacyUninitvar] if ((c1==0) && (c2==0)){ ^ RTP_Laue.c:13849:74: error: Uninitialized variable: c2 [legacyUninitvar] sig_tau_c = MIN2RAD*sqrt(c1*SC_mosaic_AB[0]*c1*SC_mosaic_AB[0] + c2*SC_mosaic_AB[1]*c2*SC_mosaic_AB[1]); ^ Checking RTP_Laue.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;OFF_LEGACY... Checking RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 RTP_Laue.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;_WIN64... Checking RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 RTP_Laue.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 ./RTP_Laue.c