2025-05-10 17:51 ftp://ftp.de.debian.org/debian/pool/main/g/g810-led/g810-led_0.4.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 -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: beb3362 (2025-05-10 14:33:23 +0200) count: 44 44 elapsed-time: 1.9 1.9 head-timing-info: old-timing-info: head results: g810-led-0.4.3/src/helpers/help.cpp:49:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/helpers/help.cpp:137:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/helpers/help.cpp:272:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/helpers/help.cpp:312:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/classes/Keyboard.cpp:423:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable red [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/classes/Keyboard.cpp:916:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable logo [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/classes/Keyboard.h:257:3: warning: Member variable 'LedKeyboard::currentDevice' is not initialized. [uninitMemberVarPrivate] g810-led-0.4.3/src/helpers/help.cpp:300:46: style: Expression is always false because 'else if' condition matches previous condition at line 298. [multiCondition] g810-led-0.4.3/src/helpers/help.cpp:31:46: performance: Function parameter 'cmdName' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:27:37: performance: Function parameter 'cmd' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:33:36: performance: Function parameter 'val' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:40:36: performance: Function parameter 'val' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:47:37: performance: Function parameter 'val' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:59:41: performance: Function parameter 'val' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/helpers/utils.cpp:206:33: performance: Function parameter 'val' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:35:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/main.cpp:44:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/main.cpp:258:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/main.cpp:326:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] g810-led-0.4.3/src/classes/Keyboard.cpp:42:46: performance:inconclusive: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.h:189:27: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:42:46: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:137:19: style:inconclusive: Technically the member function 'LedKeyboard::isOpen' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:191:8: note: Technically the member function 'LedKeyboard::isOpen' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:137:19: note: Technically the member function 'LedKeyboard::isOpen' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:344:38: style:inconclusive: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:194:14: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:344:38: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:375:41: style:inconclusive: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:197:17: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:375:41: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:1025:19: performance:inconclusive: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.h:268:8: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:1025:19: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:1062:41: style:inconclusive: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:269:17: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:1062:41: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. g810-led-0.4.3/src/classes/Keyboard.h:194:14: performance: Function 'getCurrentDevice()' should return member 'currentDevice' by const reference. [returnByReference] g810-led-0.4.3/src/classes/Keyboard.cpp:691:60: style: Condition '!setRegion(rIndex,color)' is always true [knownConditionTrueFalse] g810-led-0.4.3/src/classes/Keyboard.cpp:835:27: note: Calling function 'sendDataInternal' returns 0 g810-led-0.4.3/src/classes/Keyboard.cpp:691:71: note: Calling function 'setRegion' returns 0 g810-led-0.4.3/src/classes/Keyboard.cpp:691:60: note: Condition '!setRegion(rIndex,color)' is always true g810-led-0.4.3/src/classes/Keyboard.cpp:147:70: performance: Function parameter 'serial' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/classes/Keyboard.cpp:1025:51: style: Parameter 'data' can be declared as reference to const [constParameterReference] g810-led-0.4.3/src/classes/Keyboard.cpp:417:43: style: Unused variable: KeyByColorsIterator [unusedVariable] g810-led-0.4.3/src/main.cpp:57:46: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:66:48: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:66:66: performance: Function parameter 'arg3' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:77:42: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:77:60: performance: Function parameter 'arg3' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:89:44: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:97:44: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:105:48: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:113:45: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:113:63: performance: Function parameter 'arg3' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:169:50: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:177:50: performance: Function parameter 'arg2' should be passed by const reference. [passedByValue] g810-led-0.4.3/src/main.cpp:245:41: style: Parameter 'arg2' can be declared as pointer to const [constParameterPointer] g810-led-0.4.3/src/main.cpp:49:68: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] diff: head g810-led-0.4.3/src/classes/Keyboard.cpp:1025:19: performance:inconclusive: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.h:268:8: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:1025:19: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). head g810-led-0.4.3/src/classes/Keyboard.cpp:1062:41: style:inconclusive: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:269:17: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:1062:41: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. head g810-led-0.4.3/src/classes/Keyboard.cpp:137:19: style:inconclusive: Technically the member function 'LedKeyboard::isOpen' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:191:8: note: Technically the member function 'LedKeyboard::isOpen' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:137:19: note: Technically the member function 'LedKeyboard::isOpen' can be const. head g810-led-0.4.3/src/classes/Keyboard.cpp:344:38: style:inconclusive: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:194:14: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:344:38: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. head g810-led-0.4.3/src/classes/Keyboard.cpp:375:41: style:inconclusive: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.h:197:17: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. g810-led-0.4.3/src/classes/Keyboard.cpp:375:41: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. head g810-led-0.4.3/src/classes/Keyboard.cpp:42:46: performance:inconclusive: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.h:189:27: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.cpp:42:46: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:189:27: performance:inconclusive: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.cpp:42:46: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.h:189:27: note: Technically the member function 'LedKeyboard::listKeyboards' can be static (but you may consider moving to unnamed namespace). 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:191:8: style:inconclusive: Technically the member function 'LedKeyboard::isOpen' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.cpp:137:19: note: Technically the member function 'LedKeyboard::isOpen' can be const. g810-led-0.4.3/src/classes/Keyboard.h:191:8: note: Technically the member function 'LedKeyboard::isOpen' can be const. 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:194:14: style:inconclusive: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.cpp:344:38: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. g810-led-0.4.3/src/classes/Keyboard.h:194:14: note: Technically the member function 'LedKeyboard::getCurrentDevice' can be const. 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:197:17: style:inconclusive: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.cpp:375:41: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. g810-led-0.4.3/src/classes/Keyboard.h:197:17: note: Technically the member function 'LedKeyboard::getKeyboardModel' can be const. 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:268:8: performance:inconclusive: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). [functionStatic] g810-led-0.4.3/src/classes/Keyboard.cpp:1025:19: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). g810-led-0.4.3/src/classes/Keyboard.h:268:8: note: Technically the member function 'LedKeyboard::sendDataInternal' can be static (but you may consider moving to unnamed namespace). 2.17.0 g810-led-0.4.3/src/classes/Keyboard.h:269:17: style:inconclusive: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. [functionConst] g810-led-0.4.3/src/classes/Keyboard.cpp:1062:41: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. g810-led-0.4.3/src/classes/Keyboard.h:269:17: note: Technically the member function 'LedKeyboard::getKeyGroupAddress' can be const. DONE