2025-11-24 21:08 ftp://ftp.de.debian.org/debian/pool/main/x/xvier/xvier_1.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=motif --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j4 platform: Linux-5.4.0-216-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.69 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 cppcheck: head 2.18.0 head-info: cb76e52 (2025-11-22 14:47:37 +0100) count: 37 35 elapsed-time: 2.2 2.0 head-timing-info: old-timing-info: head results: xvier-1.0.orig/vierinit.c:17:5: warning: If memory allocation fails, then there is a possible null pointer dereference: brett [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:15:24: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:15:11: note: Assignment 'brett=(int*)malloc(row_col*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:17:5: note: Null pointer dereference xvier-1.0.orig/vierinit.c:21:5: warning: If memory allocation fails, then there is a possible null pointer dereference: weiss [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:18:24: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:18:11: note: Assignment 'weiss=(int*)malloc(vnum*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:21:5: note: Null pointer dereference xvier-1.0.orig/vierinit.c:21:16: warning: If memory allocation fails, then there is a possible null pointer dereference: schwarz [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:19:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:19:13: note: Assignment 'schwarz=(int*)malloc(vnum*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:21:16: note: Null pointer dereference xvier-1.0.orig/vierinit.c:29:7: warning: If memory allocation fails, then there is a possible null pointer dereference: freip [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:26:25: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:26:11: note: Assignment 'freip=(int**)malloc(row_col*sizeof(int*))', assigned value is 0 xvier-1.0.orig/vierinit.c:29:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:33:7: warning: If memory allocation fails, then there is a possible null pointer dereference: doublesp [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:30:28: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:30:14: note: Assignment 'doublesp=(int**)malloc(row_col*sizeof(int*))', assigned value is 0 xvier-1.0.orig/vierinit.c:33:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:50:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:50:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:51:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:51:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:52:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:52:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:53:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:53:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:58:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:58:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:59:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:59:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:60:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:60:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:61:7: warning: If memory allocation fails, then there is a possible null pointer dereference: pu [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:46:26: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:46:8: note: Assignment 'pu=(int(*)[4])malloc(vnum*sizeof(*pu))', assigned value is 0 xvier-1.0.orig/vierinit.c:61:7: note: Null pointer dereference xvier-1.0.orig/vierinit.c:83:5: warning: If memory allocation fails, then there is a possible null pointer dereference: pp [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:81:22: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:81:8: note: Assignment 'pp=(int**)malloc(row_col*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:83:5: note: Null pointer dereference xvier-1.0.orig/vierinit.c:87:5: warning: If memory allocation fails, then there is a possible null pointer dereference: _p_h_ [nullPointerOutOfMemory] xvier-1.0.orig/vierinit.c:80:24: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:80:11: note: Assignment '_p_h_=(int*)malloc((row_col+4*vnum)*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:87:5: note: Null pointer dereference xvier-1.0.orig/vierinit.c:83:19: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] xvier-1.0.orig/vierinit.c:80:24: note: Assuming allocation function fails xvier-1.0.orig/vierinit.c:80:11: note: Assignment '_p_h_=(int*)malloc((row_col+4*vnum)*sizeof(int))', assigned value is 0 xvier-1.0.orig/vierinit.c:83:19: note: Null pointer addition xvier-1.0.orig/vier.c:57:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] xvier-1.0.orig/vier.c:125:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] xvier-1.0.orig/vier.c:326:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] xvier-1.0.orig/vier.c:404:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable value [valueFlowBailoutIncompleteVar] xvier-1.0.orig/vier.c:480:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xvier-1.0.orig/xvier.c:170:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable x [valueFlowBailoutIncompleteVar] xvier-1.0.orig/xvier.c:261:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fid [valueFlowBailoutIncompleteVar] xvier-1.0.orig/xvier.c:430:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xvier-1.0.orig/vier.c:70:19: style: Array index 'j' is used before limits check. [arrayIndexThenCheck] xvier-1.0.orig/vier.c:138:19: style: Array index 'j' is used before limits check. [arrayIndexThenCheck] xvier-1.0.orig/vier.c:49:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer] xvier-1.0.orig/vier.c:117:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer] xvier-1.0.orig/vier.c:317:32: style: Variable 'p' can be declared as pointer to const [constVariablePointer] xvier-1.0.orig/vier.c:395:32: style: Variable 'p' can be declared as pointer to const [constVariablePointer] xvier-1.0.orig/vier.c:473:23: style: Variable 'p' can be declared as pointer to const [constVariablePointer] xvier-1.0.orig/vier.c:212:25: style: Variable 'p_stack[p_s_p++]' is assigned a value that is never used. [unreadVariable] xvier-1.0.orig/vier.c:278:25: style: Variable 'p_stack[p_s_p++]' is assigned a value that is never used. [unreadVariable] xvier-1.0.orig/xvier.c:521:5: warning: If memory allocation fails, then there is a possible null pointer dereference: columnfill [nullPointerOutOfMemory] xvier-1.0.orig/xvier.c:519:29: note: Assuming allocation function fails xvier-1.0.orig/xvier.c:519:16: note: Assignment 'columnfill=(int*)malloc(columns*sizeof(int))', assigned value is 0 xvier-1.0.orig/xvier.c:521:5: note: Null pointer dereference xvier-1.0.orig/xvier.c:802:2: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] xvier-1.0.orig/xvier.c:799:18: note: Assuming allocation function fails xvier-1.0.orig/xvier.c:799:18: note: Assignment 'data=malloc(w_8*h)', assigned value is 0 xvier-1.0.orig/xvier.c:802:2: note: Null pointer dereference xvier-1.0.orig/xvier.c:267:31: style: Local variable 'j' shadows outer variable [shadowVariable] xvier-1.0.orig/xvier.c:198:10: note: Shadowed declaration xvier-1.0.orig/xvier.c:267:31: note: Shadow variable xvier-1.0.orig/xvier.c:554:13: style: Variable 'vis' can be declared as pointer to const [constVariablePointer] diff: head xvier-1.0.orig/vier.c:117:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer] head xvier-1.0.orig/vier.c:49:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer] DONE