2025-07-22 00:08 ftp://ftp.de.debian.org/debian/pool/main/h/hal-flash/hal-flash_0.3.3.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --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 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.18.0 head-info: 140480f (2025-07-21 08:45:09 +0200) count: 16 16 elapsed-time: 0.1 0.1 head-timing-info: old-timing-info: head results: hal-flash-0.3.3/test/flash.c:34:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hal-flash-0.3.3/test/flash.c:83:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBUS_BUS_SYSTEM [valueFlowBailoutIncompleteVar] hal-flash-0.3.3/test/flash.c:64:5: warning: If memory allocation fails, then there is a possible null pointer dereference: hdd_object_paths [nullPointerOutOfMemory] hal-flash-0.3.3/test/flash.c:56:39: note: Assuming allocation function fails hal-flash-0.3.3/test/flash.c:56:24: note: Assignment 'hdd_object_paths=(char**)malloc(sizeof(char*)*(num_hdd+1))', assigned value is 0 hal-flash-0.3.3/test/flash.c:64:5: note: Null pointer dereference hal-flash-0.3.3/test/flash.c:111:15: style: Variable 'udi_disk' can be declared as pointer to const [constVariablePointer] hal-flash-0.3.3/test/flash.c:75:11: style: Unused variable: handle [unusedVariable] hal-flash-0.3.3/test/flash.c:76:11: style: Unused variable: error [unusedVariable] hal-flash-0.3.3/src/libhal.c:330:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] hal-flash-0.3.3/src/libhal.c:214:9: portability: %lu in format string (no. 3) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] hal-flash-0.3.3/src/libhal.c:102:21: style: Variable 'drive_proxy' can be declared as pointer to const [constVariablePointer] hal-flash-0.3.3/src/libhal.c:287:49: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:287:99: style: Parameter 'error' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:348:48: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:348:98: style: Parameter 'error' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:355:51: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:355:101: style: Parameter 'error' can be declared as pointer to const [constParameterPointer] hal-flash-0.3.3/src/libhal.c:57:17: style: Variable 'vdata_p' is assigned a value that is never used. [unreadVariable] diff: DONE