2025-05-07 21:30 ftp://ftp.de.debian.org/debian/pool/main/s/safecopy/safecopy_1.7.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --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 -j1 platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: ebc80c0 (2025-05-07 18:59:31 +0200) count: 61 61 elapsed-time: 0.6 0.6 head-timing-info: old-timing-info: head results: safecopy-1.7/simulator/src/simulatorlb.c:140:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:238:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:347:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RTLD_NEXT [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:357:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:374:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:427:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:471:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] safecopy-1.7/simulator/src/simulatorlb.c:251:5: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:252:5: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] safecopy-1.7/simulator/src/simulatorlb.c:254:5: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:255:20: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] safecopy-1.7/simulator/src/simulatorlb.c:257:5: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:258:20: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] safecopy-1.7/simulator/src/simulatorlb.c:263:5: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:264:20: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] safecopy-1.7/simulator/src/simulatorlb.c:272:5: warning: %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:277:5: warning: %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:277:5: warning: %u in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:283:5: warning: %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] safecopy-1.7/simulator/src/simulatorlb.c:260:5: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] safecopy-1.7/simulator/src/simulatorlb.c:306:7: style: Local variable 'current' shadows outer variable [shadowVariable] safecopy-1.7/simulator/src/simulatorlb.c:57:14: note: Shadowed declaration safecopy-1.7/simulator/src/simulatorlb.c:306:7: note: Shadow variable safecopy-1.7/simulator/src/simulatorlb.c:331:7: style: Local variable 'current' shadows outer variable [shadowVariable] safecopy-1.7/simulator/src/simulatorlb.c:57:14: note: Shadowed declaration safecopy-1.7/simulator/src/simulatorlb.c:331:7: note: Shadow variable safecopy-1.7/simulator/src/simulatorlb.c:137:74: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] safecopy-1.7/simulator/src/simulatorlb.c:186:45: style: Parameter 'array' can be declared as pointer to const [constParameterPointer] safecopy-1.7/simulator/src/simulatorlb.c:186:67: style: Parameter 'count' can be declared as pointer to const [constParameterPointer] safecopy-1.7/simulator/src/simulatorlb.c:293:34: style: Parameter 'text' can be declared as pointer to const [constParameterPointer] safecopy-1.7/simulator/src/simulatorlb.c:246:12: style: Variable 'x.sector' is assigned a value that is never used. [unreadVariable] safecopy-1.7/simulator/src/simulatorlb.c:306:14: style: Variable 'current' is assigned a value that is never used. [unreadVariable] safecopy-1.7/simulator/src/simulatorlb.c:331:14: style: Variable 'current' is assigned a value that is never used. [unreadVariable] safecopy-1.7/src/arglist.c:50:10: style: Variable 'frst' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:50:17: style: Variable 'scnd' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:57:10: style: Variable 'frst' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:57:17: style: Variable 'scnd' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:66:10: style: Variable 'identity' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:89:20: style: Variable 'data' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:266:45: style: Parameter 'argv' can be declared as const array [constParameter] safecopy-1.7/src/arglist.c:361:20: style: Variable 'data' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/arglist.c:397:30: style: Parameter 'text' can be declared as pointer to const [constParameterPointer] safecopy-1.7/src/arglist.c:435:28: style: Parameter 'text' can be declared as pointer to const [constParameterPointer] safecopy-1.7/src/arglist.c:68:12: style: Variable 'identity' is assigned a value that is never used. [unreadVariable] safecopy-1.7/src/arglist.c:93:8: style: Variable 'data' is assigned a value that is never used. [unreadVariable] safecopy-1.7/src/arglist.c:407:14: style: Variable 'isnegative' is assigned a value that is never used. [unreadVariable] safecopy-1.7/src/arglist.c:416:19: style: Variable 'isnegative' is assigned a value that is never used. [unreadVariable] safecopy-1.7/src/lowlevel.c:12:45: style: Parameter 'fd' can be declared as pointer to const [constParameterPointer] safecopy-1.7/src/lowlevel.c:19:31: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] safecopy-1.7/src/lowlevel.c:22:32: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] safecopy-1.7/src/safecopy.c:170:31: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] safecopy-1.7/src/textlist.c:40:22: style: Variable 'frst' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/textlist.c:40:28: style: Variable 'scnd' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/textlist.c:47:22: style: Variable 'frst' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/textlist.c:47:28: style: Variable 'scnd' can be declared as pointer to const [constVariablePointer] safecopy-1.7/src/voidlist.c:149:3: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:148:40: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:148:13: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:149:3: note: Null pointer dereference safecopy-1.7/src/voidlist.c:150:3: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:148:40: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:148:13: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:150:3: note: Null pointer dereference safecopy-1.7/src/voidlist.c:151:3: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:148:40: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:148:13: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:151:3: note: Null pointer dereference safecopy-1.7/src/voidlist.c:152:3: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:148:40: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:148:13: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:152:3: note: Null pointer dereference safecopy-1.7/src/voidlist.c:180:4: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:179:41: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:179:14: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:180:4: note: Null pointer dereference safecopy-1.7/src/voidlist.c:181:4: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:179:41: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:179:14: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:181:4: note: Null pointer dereference safecopy-1.7/src/voidlist.c:182:4: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:179:41: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:179:14: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:182:4: note: Null pointer dereference safecopy-1.7/src/voidlist.c:183:4: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:179:41: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:179:14: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:183:4: note: Null pointer dereference safecopy-1.7/src/voidlist.c:186:8: warning: If memory allocation fails, then there is a possible null pointer dereference: newmember [nullPointerOutOfMemory] safecopy-1.7/src/voidlist.c:179:41: note: Assuming allocation function fails safecopy-1.7/src/voidlist.c:179:14: note: Assignment 'newmember=(struct voidentry*)malloc(sizeof(struct voidentry))', assigned value is 0 safecopy-1.7/src/voidlist.c:186:8: note: Null pointer dereference safecopy-1.7/src/voidlist.c:253:41: style: Parameter 'list' can be declared as pointer to const [constParameterPointer] diff: DONE