2024-04-24 00:57 ftp://ftp.de.debian.org/debian/pool/main/c/clamz/clamz_0.5.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=libcurl --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 7dab204 (2024-04-23 22:20:29 +0200) count: 24 24 elapsed-time: 9.3 9.8 head-timing-info: old-timing-info: head results: clamz-0.5/clamz.c:135:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] clamz-0.5/clamz.c:316:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRYCTL_DISABLE_SECMEM [valueFlowBailoutIncompleteVar] clamz-0.5/clamz.c:386:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] clamz-0.5/clamz.c:432:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] clamz-0.5/clamz.c:129:7: error: Common realloc mistake: 'inbuf' nulled but not freed upon failure [memleakOnRealloc] clamz-0.5/clamz.c:308:9: style: Variable 'str' can be declared as pointer to const [constVariablePointer] clamz-0.5/clamz.c:383:13: style: Variable 'q' can be declared as pointer to const [constVariablePointer] clamz-0.5/download.c:68:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CURLOPT_ERRORBUFFER [valueFlowBailoutIncompleteVar] clamz-0.5/download.c:147:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CURLOPT_VERBOSE [valueFlowBailoutIncompleteVar] clamz-0.5/download.c:167:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] clamz-0.5/download.c:189:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] clamz-0.5/download.c:292:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] clamz-0.5/download.c:106:74: style: Parameter 'text' can be declared as pointer to const. However it seems that 'write_debug_info' is a callback function, if 'text' is declared with const you might also need to cast function pointer(s). [constParameterCallback] clamz-0.5/download.c:148:57: note: You might need to cast the function pointer here clamz-0.5/download.c:106:74: note: Parameter 'text' can be declared as pointer to const clamz-0.5/download.c:182:34: style: Parameter 'ptr' can be declared as pointer to const. However it seems that 'write_output' is a callback function, if 'ptr' is declared with const you might also need to cast function pointer(s). [constParameterCallback] clamz-0.5/download.c:316:55: note: You might need to cast the function pointer here clamz-0.5/download.c:182:34: note: Parameter 'ptr' can be declared as pointer to const clamz-0.5/options.c:292:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] clamz-0.5/options.c:354:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] clamz-0.5/options.c:31:60: style:inconclusive: Function 'get_config_file_name' argument 2 names different: declaration 'name' definition 'base'. [funcArgNamesDifferent] clamz-0.5/clamz.h:103:60: note: Function 'get_config_file_name' argument 2 names different: declaration 'name' definition 'base'. clamz-0.5/options.c:31:60: note: Function 'get_config_file_name' argument 2 names different: declaration 'name' definition 'base'. clamz-0.5/options.c:34:9: style: Variable 'home' can be declared as pointer to const [constVariablePointer] clamz-0.5/options.c:112:50: style: Parameter 'cfg' can be declared as pointer to const [constParameterPointer] clamz-0.5/playlist.c:450:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] clamz-0.5/playlist.c:552:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_ERROR_ABORTED [valueFlowBailoutIncompleteVar] clamz-0.5/playlist.c:450:5: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] clamz-0.5/playlist.c:456:3: warning: Either the condition '!decrypted' is redundant or there is possible null pointer dereference: decrypted. [nullPointerRedundantCheck] clamz-0.5/playlist.c:458:7: note: Assuming that condition '!decrypted' is not redundant clamz-0.5/playlist.c:456:3: note: Null pointer dereference clamz-0.5/vars.c:50:7: error: Common realloc mistake: 'converted' nulled but not freed upon failure [memleakOnRealloc] diff: DONE