2025-07-05 22:18 ftp://ftp.de.debian.org/debian/pool/main/s/smpq/smpq_1.6.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=qt --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-63-generic-x86_64-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: 9b11b6b (2025-07-04 16:03:30 +0200) count: 38 38 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: smpq-1.6/append.c:43:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MPQ_FILE_ENCRYPTED [valueFlowBailoutIncompleteVar] smpq-1.6/append.c:258:80: error: Uninitialized variable: SFileName [uninitvar] smpq-1.6/check.c:4:0: error: #error You have old Stormlib version [preprocessorErrorDirective] smpq-1.6/check.c:4:2: error: #error You have old Stormlib version [preprocessorErrorDirective] smpq-1.6/dirname.c:43:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_CTYPE [valueFlowBailoutIncompleteVar] smpq-1.6/dirname.c:167:8: error: Common realloc mistake: 'retfail' nulled but not freed upon failure [memleakOnRealloc] smpq-1.6/dirname.c:183:3: error: Common realloc mistake: 'retfail' nulled but not freed upon failure [memleakOnRealloc] smpq-1.6/extract.c:85:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] smpq-1.6/extract.c:180:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable STREAM_FLAG_READ_ONLY [valueFlowBailoutIncompleteVar] smpq-1.6/extract.c:346:45: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] smpq-1.6/extract.c:456:5: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] smpq-1.6/extract.c:77:3: error: Memory leak: path [memleak] smpq-1.6/extract.c:60:9: style: Variable 'r' can be declared as pointer to const [constVariablePointer] smpq-1.6/info.c:42:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable STREAM_FLAG_READ_ONLY [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:112:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KDIR_SEPARATOR [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:156:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CaseInsensitive [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:203:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KDIR_SEPARATOR [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:213:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KDIR_SEPARATOR [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:260:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:354:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:473:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:551:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:653:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_CANNOT_ENTER_DIRECTORY [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:769:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:920:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR_DOES_NOT_EXIST [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:1065:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR_HANDLE_EOF [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:1101:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FILE_BEGIN [valueFlowBailoutIncompleteVar] smpq-1.6/kio_smpq.cpp:793:7: style: Condition '!found' is always true [knownConditionTrueFalse] smpq-1.6/kio_smpq.cpp:790:15: note: Assignment 'found=false', assigned value is 0 smpq-1.6/kio_smpq.cpp:793:7: note: Condition '!found' is always true smpq-1.6/kio_smpq.cpp:389:9: style: The scope of the variable 'bytes' can be reduced. [variableScope] smpq-1.6/kio_smpq.cpp:693:14: style: Local variable 'fileName' shadows outer variable [shadowVariable] smpq-1.6/kio_smpq.cpp:640:10: note: Shadowed declaration smpq-1.6/kio_smpq.cpp:693:14: note: Shadow variable smpq-1.6/listfiles.c:91:18: style: Variable 'ent' can be declared as pointer to const [constVariablePointer] smpq-1.6/main.c:278:11: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] smpq-1.6/print.c:43:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] smpq-1.6/print.c:51:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] smpq-1.6/print.c:63:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] smpq-1.6/print.c:26:30: warning: Function 'printError' argument order different: declaration 'archive, file, message, errnum' definition 'archive, message, file, errnum' [funcArgOrderDifferent] smpq-1.6/common.h:144:30: note: Function 'printError' argument order different: declaration 'archive, file, message, errnum' definition 'archive, message, file, errnum' smpq-1.6/print.c:26:30: note: Function 'printError' argument order different: declaration 'archive, file, message, errnum' definition 'archive, message, file, errnum' smpq-1.6/remove.c:33:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MPQ_OPEN_NO_LISTFILE [valueFlowBailoutIncompleteVar] smpq-1.6/rename.c:31:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MPQ_OPEN_NO_LISTFILE [valueFlowBailoutIncompleteVar] diff: head smpq-1.6/check.c:4:2: error: #error You have old Stormlib version [preprocessorErrorDirective] 2.17.0 smpq-1.6/listfiles.c:97:18: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] DONE