2026-05-03 00:37 ftp://ftp.de.debian.org/debian/pool/main/l/lm4tools/lm4tools_0.1.3.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-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 54 45 elapsed-time: 0.5 0.4 head-timing-info: old-timing-info: head results: lm4tools-0.1.3/lm4flash/lm4flash.c:217:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_NO_MEM [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:252:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_NO_MEM [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:270:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_NO_MEM [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:345:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_NO_MEM [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:368:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_NO_MEM [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:392:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_OTHER [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:423:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_OTHER [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:535:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_ERROR_OTHER [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:617:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:728:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:815:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lm4flash/lm4flash.c:240:9: warning: Identical condition and return expression 'retval', return value is always 0 [identicalConditionAfterEarlyExit] lm4tools-0.1.3/lm4flash/lm4flash.c:229:6: note: If condition 'retval' is true, the function will return/exit lm4tools-0.1.3/lm4flash/lm4flash.c:240:9: note: Returning identical expression 'retval' lm4tools-0.1.3/lm4flash/lm4flash.c:627:16: style: Variable 'flasher_error' is reassigned a value before the old one has been used. [redundantAssignment] lm4tools-0.1.3/lm4flash/lm4flash.c:622:17: note: flasher_error is assigned lm4tools-0.1.3/lm4flash/lm4flash.c:627:16: note: flasher_error is overwritten lm4tools-0.1.3/lm4flash/lm4flash.c:331:26: style: Local variable 'buf' shadows outer variable [shadowVariable] lm4tools-0.1.3/lm4flash/lm4flash.c:90:3: note: Shadowed declaration lm4tools-0.1.3/lm4flash/lm4flash.c:331:26: note: Shadow variable lm4tools-0.1.3/lm4flash/lm4flash.c:330:7: style: Variable 'prefix' can be declared as const array [constVariable] lm4tools-0.1.3/lm4flash/lm4flash.c:356:32: style: Parameter 'inbuf' can be declared as pointer to const [constParameterPointer] lm4tools-0.1.3/lm4flash/lm4flash.c:89:11: style: union member 'Anonymous0::u32' is never used. [unusedStructMember] lm4tools-0.1.3/lmicdiusb/gdb.c:98:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/gdb.c:183:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/gdb.c:71:20: style: The if condition is the same as the previous if condition [duplicateCondition] lm4tools-0.1.3/lmicdiusb/gdb.c:66:20: note: First condition lm4tools-0.1.3/lmicdiusb/gdb.c:71:20: note: Second condition lm4tools-0.1.3/lmicdiusb/gdb.c:206:17: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/gdb.c:211:13: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/gdb.c:98:16: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/gdb.c:124:16: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/gdb.c:133:16: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/gdb.c:140:16: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/gdb.c:90:50: style: Parameter 'pBuf' can be declared as pointer to const [constParameterPointer] lm4tools-0.1.3/lmicdiusb/lmicdi.c:69:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/lmicdi.c:98:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/lmicdi.c:116:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/lmicdi.c:169:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/lmicdi.c:200:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/lmicdi.c:327:21: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/lmicdi.c:357:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/lmicdi.c:175:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/lmicdi.c:216:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/lmicdi.c:262:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/lmicdi.c:269:17: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/lmicdi.c:300:21: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/lmicdi.c:169:5: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/lmicdi.c:175:9: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/socket.c:78:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_TRANSFER_COMPLETED [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:110:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LIBUSB_TRANSFER_TYPE_BULK [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:150:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:185:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:294:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:392:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pollfd [valueFlowBailoutIncompleteVar] lm4tools-0.1.3/lmicdiusb/socket.c:80:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/socket.c:135:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/socket.c:294:13: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/socket.c:327:21: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] lm4tools-0.1.3/lmicdiusb/socket.c:192:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] lm4tools-0.1.3/lmicdiusb/socket.c:127:5: style: Checking if unsigned expression 'gTraceLvl' is less than zero. [unsignedLessThanZero] lm4tools-0.1.3/lmicdiusb/socket.c:76:42: style: Parameter 'pTrans' can be declared as pointer to const. However it seems that 'usb_req_callback' is a callback function, if 'pTrans' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lm4tools-0.1.3/lmicdiusb/socket.c:112:31: note: You might need to cast the function pointer here lm4tools-0.1.3/lmicdiusb/socket.c:76:42: note: Parameter 'pTrans' can be declared as pointer to const diff: head lm4tools-0.1.3/lmicdiusb/gdb.c:206:17: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/gdb.c:211:13: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/lmicdi.c:200:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/lmicdi.c:327:21: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/lmicdi.c:357:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/socket.c:135:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/socket.c:294:13: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/socket.c:327:21: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] head lm4tools-0.1.3/lmicdiusb/socket.c:80:9: style: Comparing expression of type 'unsigned int' against value -1. Condition is always false. [compareValueOutOfTypeRangeError] DONE