2025-05-08 14:48 ftp://ftp.de.debian.org/debian/pool/main/u/unpaper/unpaper_7.0.0.orig.tar.xz 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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 66c9938 (2025-05-08 13:55:11 +0200) count: 36 36 elapsed-time: 0.4 0.4 head-timing-info: old-timing-info: head results: unpaper-7.0.0/file.c:50:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable codec_id [valueFlowBailoutIncompleteVar] unpaper-7.0.0/file.c:157:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AV_CODEC_ID_PPM [valueFlowBailoutIncompleteVar] unpaper-7.0.0/parse.c:163:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HUGE_VAL [valueFlowBailoutIncompleteVar] unpaper-7.0.0/file.c:129:41: style:inconclusive: Function 'saveImage' argument 2 names different: declaration 'image' definition 'input'. [funcArgNamesDifferent] unpaper-7.0.0/unpaper.h:144:41: note: Function 'saveImage' argument 2 names different: declaration 'image' definition 'input'. unpaper-7.0.0/file.c:129:41: note: Function 'saveImage' argument 2 names different: declaration 'image' definition 'input'. unpaper-7.0.0/file.c:255:22: style: Parameter 'filenameTemplate' can be declared as pointer to const [constParameterPointer] unpaper-7.0.0/parse.c:302:9: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] unpaper-7.0.0/parse.c:325:61: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: s1 [nullPointerOutOfMemory] unpaper-7.0.0/parse.c:281:14: note: Assuming allocation function fails unpaper-7.0.0/parse.c:281:14: note: Assignment 's1=strdup(optarg)', assigned value is 0 unpaper-7.0.0/parse.c:325:61: note: Null pointer dereference unpaper-7.0.0/parse.c:148:22: style: Parameter 's' can be declared as pointer to const [constParameterPointer] unpaper-7.0.0/parse.c:180:22: style: Parameter 's' can be declared as pointer to const [constParameterPointer] unpaper-7.0.0/parse.c:182:9: style: Variable 'comma' can be declared as pointer to const [constVariablePointer] unpaper-7.0.0/parse.c:228:24: style: Parameter 's' can be declared as pointer to const [constParameterPointer] unpaper-7.0.0/tools.c:193:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _a [valueFlowBailoutIncompleteVar] unpaper-7.0.0/tools.c:211:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _a [valueFlowBailoutIncompleteVar] unpaper-7.0.0/unpaper.c:368:12: error: There is an unknown macro here somewhere. Configuration is required. If VERSION_STR is a macro then please configure it. [unknownMacro] unpaper-7.0.0/imageprocess.c:1016:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _a [valueFlowBailoutIncompleteVar] unpaper-7.0.0/tools.c:31:12: style: Variable 'pix' can be declared as pointer to const [constVariablePointer] unpaper-7.0.0/imageprocess.c:984:5: warning: If memory allocation fails, then there is a possible null pointer dereference: curCounts [nullPointerOutOfMemory] unpaper-7.0.0/imageprocess.c:978:26: note: Assuming allocation function fails unpaper-7.0.0/imageprocess.c:978:26: note: Assignment 'curCounts=calloc(blocksPerRow+2,sizeof(int))', assigned value is 0 unpaper-7.0.0/imageprocess.c:984:5: note: Null pointer dereference unpaper-7.0.0/imageprocess.c:989:3: warning: If memory allocation fails, then there is a possible null pointer dereference: curCounts [nullPointerOutOfMemory] unpaper-7.0.0/imageprocess.c:978:26: note: Assuming allocation function fails unpaper-7.0.0/imageprocess.c:978:26: note: Assignment 'curCounts=calloc(blocksPerRow+2,sizeof(int))', assigned value is 0 unpaper-7.0.0/imageprocess.c:989:3: note: Null pointer dereference unpaper-7.0.0/imageprocess.c:990:3: warning: If memory allocation fails, then there is a possible null pointer dereference: curCounts [nullPointerOutOfMemory] unpaper-7.0.0/imageprocess.c:978:26: note: Assuming allocation function fails unpaper-7.0.0/imageprocess.c:978:26: note: Assignment 'curCounts=calloc(blocksPerRow+2,sizeof(int))', assigned value is 0 unpaper-7.0.0/imageprocess.c:990:3: note: Null pointer dereference unpaper-7.0.0/imageprocess.c:991:3: warning: If memory allocation fails, then there is a possible null pointer dereference: nextCounts [nullPointerOutOfMemory] unpaper-7.0.0/imageprocess.c:980:27: note: Assuming allocation function fails unpaper-7.0.0/imageprocess.c:980:27: note: Assignment 'nextCounts=calloc(blocksPerRow+2,sizeof(int))', assigned value is 0 unpaper-7.0.0/imageprocess.c:991:3: note: Null pointer dereference unpaper-7.0.0/imageprocess.c:992:3: warning: If memory allocation fails, then there is a possible null pointer dereference: nextCounts [nullPointerOutOfMemory] unpaper-7.0.0/imageprocess.c:980:27: note: Assuming allocation function fails unpaper-7.0.0/imageprocess.c:980:27: note: Assignment 'nextCounts=calloc(blocksPerRow+2,sizeof(int))', assigned value is 0 unpaper-7.0.0/imageprocess.c:992:3: note: Null pointer dereference unpaper-7.0.0/imageprocess.c:706:40: style:inconclusive: Function 'applyMasks' argument 2 names different: declaration 'maskCount' definition 'masksCount'. [funcArgNamesDifferent] unpaper-7.0.0/imageprocess.h:35:40: note: Function 'applyMasks' argument 2 names different: declaration 'maskCount' definition 'masksCount'. unpaper-7.0.0/imageprocess.c:706:40: note: Function 'applyMasks' argument 2 names different: declaration 'maskCount' definition 'masksCount'. unpaper-7.0.0/imageprocess.c:869:14: style: Local variable 'mask' shadows outer variable [shadowVariable] unpaper-7.0.0/unpaper.h:62:12: note: Shadowed declaration unpaper-7.0.0/imageprocess.c:869:14: note: Shadow variable unpaper-7.0.0/imageprocess.c:999:12: style: Local variable 'top' shadows outer variable [shadowVariable] unpaper-7.0.0/imageprocess.c:967:7: note: Shadowed declaration unpaper-7.0.0/imageprocess.c:999:12: note: Shadow variable unpaper-7.0.0/imageprocess.c:1277:8: style: Local variable 'mask' shadows outer variable [shadowVariable] unpaper-7.0.0/unpaper.h:62:12: note: Shadowed declaration unpaper-7.0.0/imageprocess.c:1277:8: note: Shadow variable unpaper-7.0.0/imageprocess.c:587:28: style: Parameter 'maskScanSize' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:588:28: style: Parameter 'maskScanDepth' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:589:28: style: Parameter 'maskScanStep' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:590:30: style: Parameter 'maskScanThreshold' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:591:28: style: Parameter 'maskScanMinimum' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:592:28: style: Parameter 'maskScanMaximum' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:1093:37: style: Parameter 'center' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:1259:23: style: Parameter 'border' can be declared as const array [constParameter] unpaper-7.0.0/imageprocess.c:1260:28: style: Parameter 'image' can be declared as pointer to const [constParameterPointer] unpaper-7.0.0/imageprocess.c:83:12: style: Variable 'diff' is assigned a value that is never used. [unreadVariable] unpaper-7.0.0/imageprocess.c:482:24: style: Variable 'hh' is assigned a value that is never used. [unreadVariable] diff: DONE