INFO: No output directory specified (--dir) INFO: Using directory: "Test_Magnon_bcc_2D_20250815_105116" INFO: Regenerating c-file: Test_Magnon_bcc_2D.c DEBUG: CMD: /home/willend/micromamba/bin/mcstas -t -o ./Test_Magnon_bcc_2D.c Test_Magnon_bcc_2D.instr CFLAGS= -O0 WARNING: The parameter mosaic_AB of Lattice 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: ----------------------------------------------------------- Generating GPU/CPU -DFUNNEL layout: ----------------------------------------------------------- DEBUG: CMD: /home/willend/micromamba/bin/mcstas finished INFO: Linting generated code: ./Test_Magnon_bcc_2D.c DEBUG: CMD: cppcheck ./Test_Magnon_bcc_2D.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_Magnon_bcc_2D.c ... Checking Test_Magnon_bcc_2D.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_Magnon_bcc_2D.c:11107:16: error: Memory leak: OUTFILE [memleak] if (!file) return(NULL); ^ Test_Magnon_bcc_2D.c:11356:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].h = h; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11356:7: note: Null pointer dereference list[i].h = h; ^ Test_Magnon_bcc_2D.c:11357:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].k = k; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11357:7: note: Null pointer dereference list[i].k = k; ^ Test_Magnon_bcc_2D.c:11358:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].l = l; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11358:7: note: Null pointer dereference list[i].l = l; ^ Test_Magnon_bcc_2D.c:11359:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].F2 = F2; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11359:7: note: Null pointer dereference list[i].F2 = F2; ^ Test_Magnon_bcc_2D.c:11362: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11362:7: note: Null pointer dereference list[i].tau_x = h*info->asx + k*info->bsx + l*info->csx; ^ Test_Magnon_bcc_2D.c:11363: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11363:7: note: Null pointer dereference list[i].tau_y = h*info->asy + k*info->bsy + l*info->csy; ^ Test_Magnon_bcc_2D.c:11364: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11364:7: note: Null pointer dereference list[i].tau_z = h*info->asz + k*info->bsz + l*info->csz; ^ Test_Magnon_bcc_2D.c:11365: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 + ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11365:7: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ Test_Magnon_bcc_2D.c:11365: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 + ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11365:26: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ Test_Magnon_bcc_2D.c:11365: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 + ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11365:40: note: Null pointer dereference list[i].tau = sqrt(list[i].tau_x*list[i].tau_x + ^ Test_Magnon_bcc_2D.c:11366:26: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_y*list[i].tau_y + ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11366:26: note: Null pointer dereference list[i].tau_y*list[i].tau_y + ^ Test_Magnon_bcc_2D.c:11366:40: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_y*list[i].tau_y + ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11366:40: note: Null pointer dereference list[i].tau_y*list[i].tau_y + ^ Test_Magnon_bcc_2D.c:11367:26: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_z*list[i].tau_z); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11367:26: note: Null pointer dereference list[i].tau_z*list[i].tau_z); ^ Test_Magnon_bcc_2D.c:11367:40: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].tau_z*list[i].tau_z); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11367:40: note: Null pointer dereference list[i].tau_z*list[i].tau_z); ^ Test_Magnon_bcc_2D.c:11368: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11368:7: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ Test_Magnon_bcc_2D.c:11368: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11368:21: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ Test_Magnon_bcc_2D.c:11368: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11368:35: note: Null pointer dereference list[i].u1x = list[i].tau_x/list[i].tau; ^ Test_Magnon_bcc_2D.c:11369: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11369:7: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ Test_Magnon_bcc_2D.c:11369: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11369:21: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ Test_Magnon_bcc_2D.c:11369: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11369:35: note: Null pointer dereference list[i].u1y = list[i].tau_y/list[i].tau; ^ Test_Magnon_bcc_2D.c:11370: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11370:7: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ Test_Magnon_bcc_2D.c:11370: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11370:21: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ Test_Magnon_bcc_2D.c:11370: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11370:35: note: Null pointer dereference list[i].u1z = list[i].tau_z/list[i].tau; ^ Test_Magnon_bcc_2D.c:11371: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; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11371:41: note: Null pointer dereference sig1 = FWHM2RMS*info->m_delta_d_d*list[i].tau; ^ Test_Magnon_bcc_2D.c:11375: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); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11375:18: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ Test_Magnon_bcc_2D.c:11375: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); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11375:31: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ Test_Magnon_bcc_2D.c:11375: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); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11375:44: note: Null pointer dereference list[i].u1x, list[i].u1y, list[i].u1z); ^ Test_Magnon_bcc_2D.c:11376:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] vec_prod(b2[0], b2[1], b2[2], ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11376:7: note: Null pointer dereference vec_prod(b2[0], b2[1], b2[2], ^ Test_Magnon_bcc_2D.c:11383:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2x = b1[0]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11383:9: note: Null pointer dereference list[i].u2x = b1[0]; ^ Test_Magnon_bcc_2D.c:11384:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2y = b1[1]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11384:9: note: Null pointer dereference list[i].u2y = b1[1]; ^ Test_Magnon_bcc_2D.c:11385:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u2z = b1[2]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11385:9: note: Null pointer dereference list[i].u2z = b1[2]; ^ Test_Magnon_bcc_2D.c:11386:25: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] sig2 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11386:25: note: Null pointer dereference sig2 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ Test_Magnon_bcc_2D.c:11387:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3x = b2[0]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11387:9: note: Null pointer dereference list[i].u3x = b2[0]; ^ Test_Magnon_bcc_2D.c:11388:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3y = b2[1]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11388:9: note: Null pointer dereference list[i].u3y = b2[1]; ^ Test_Magnon_bcc_2D.c:11389:9: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].u3z = b2[2]; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11389:9: note: Null pointer dereference list[i].u3z = b2[2]; ^ Test_Magnon_bcc_2D.c:11390:25: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] sig3 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11390:25: note: Null pointer dereference sig3 = FWHM2RMS*list[i].tau*MIN2RAD*SC_mosaic; ^ Test_Magnon_bcc_2D.c:11508:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].sig123 = sig1*sig2*sig3; ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11508:7: note: Null pointer dereference list[i].sig123 = sig1*sig2*sig3; ^ Test_Magnon_bcc_2D.c:11509:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m1 = 1/(2*sig1*sig1); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11509:7: note: Null pointer dereference list[i].m1 = 1/(2*sig1*sig1); ^ Test_Magnon_bcc_2D.c:11510:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m2 = 1/(2*sig2*sig2); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11510:7: note: Null pointer dereference list[i].m2 = 1/(2*sig2*sig2); ^ Test_Magnon_bcc_2D.c:11511:7: warning: If memory allocation fails, then there is a possible null pointer dereference: list [nullPointerOutOfMemory] list[i].m3 = 1/(2*sig3*sig3); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11511:7: note: Null pointer dereference list[i].m3 = 1/(2*sig3*sig3); ^ Test_Magnon_bcc_2D.c:11527: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); ^ Test_Magnon_bcc_2D.c:11339:37: note: Assuming allocation function fails list = (struct hkl_data*) malloc(size*sizeof(struct hkl_data)); ^ Test_Magnon_bcc_2D.c:11339: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)); ^ Test_Magnon_bcc_2D.c:11527:11: note: Null pointer dereference qsort(list, i, sizeof(struct hkl_data), SX_list_compare); ^ Test_Magnon_bcc_2D.c:11481:14: error: Uninitialized variable: c1 [legacyUninitvar] if ((c1==0) && (c2==0)){ ^ Test_Magnon_bcc_2D.c:11487: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 Test_Magnon_bcc_2D.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 Test_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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 Test_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.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_Magnon_bcc_2D.c