2025-08-31 13:36 ftp://ftp.de.debian.org/debian/pool/main/i/indi-webcam/indi-webcam_1.0+20221222161740.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=zlib --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-79-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.18.0 head-info: 2ee39fe (2025-08-30 22:07:31 +0200) count: 2 66 elapsed-time: 0.1 0.6 head-timing-info: old-timing-info: head results: indi-webcam-1.0+20221222161740/indi_webcam.h:213:0: error: failed to evaluate #if condition, undefined function-like macro invocation: AV_VERSION_INT( ... ) [preprocessorErrorDirective] indi-webcam-1.0+20221222161740/indi_webcam.h:213:2: error: failed to evaluate #if condition, undefined function-like macro invocation: AV_VERSION_INT( ... ) [preprocessorErrorDirective] diff: 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1039:18: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1067:18: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1081:18: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1097:18: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1137:28: style: Condition 'a' is always true [knownConditionTrueFalse] indi-webcam-1.0+20221222161740/indi_webcam.cpp:1135:41: note: Calling function 'refreshInputDevices' returns 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1135:41: note: Assignment 'a=refreshInputDevices()', assigned value is 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1137:28: note: Condition 'a' is always true 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1137:33: style: Condition 'b' is always true [knownConditionTrueFalse] indi-webcam-1.0+20221222161740/indi_webcam.cpp:1136:41: note: Calling function 'refreshInputSources' returns 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1136:41: note: Assignment 'b=refreshInputSources()', assigned value is 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1137:33: note: Condition 'b' is always true 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1155:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPS_OK [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:115:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1232:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1277:8: style: Condition '!flush_frame_buffer()' is always false [knownConditionTrueFalse] indi-webcam-1.0+20221222161740/indi_webcam.cpp:1277:27: note: Calling function 'flush_frame_buffer' returns 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1277:8: note: Condition '!flush_frame_buffer()' is always false 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1304:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable InExposure [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1313:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable timeval [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1335:11: style: The scope of the variable 'timeleft' can be reduced. [variableScope] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1337:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable InExposure [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1395:23: style: C-style pointer casting [cstyleCast] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1427:19: style: Variable 'newBuffer' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:151:14: warning: Member variable 'indi_webcam::videoStream' is not initialized in the constructor. [uninitMemberVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1524:22: style: Variable 'startG' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1525:22: style: Variable 'startB' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1542:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PrimaryCCD [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1563:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AV_LOG_DEBUG [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1620:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AV_PIX_FMT_RGB24 [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1652:8: style: Condition '!flush_frame_buffer()' is always false [knownConditionTrueFalse] indi-webcam-1.0+20221222161740/indi_webcam.cpp:1652:27: note: Calling function 'flush_frame_buffer' returns 1 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1652:8: note: Condition '!flush_frame_buffer()' is always false 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1701:19: style: Variable 'bigOriginalImage' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1735:14: style: C-style pointer casting [cstyleCast] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1764:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SWS_CS_DEFAULT [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1791:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1794:17: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1820:13: style: Local variable 'ret' shadows outer variable [shadowVariable] indi-webcam-1.0+20221222161740/indi_webcam.cpp:1776:9: note: Shadowed declaration indi-webcam-1.0+20221222161740/indi_webcam.cpp:1820:13: note: Shadow variable 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1843:32: style: C-style pointer casting [cstyleCast] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:1873:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:230:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPS_BUSY [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:238:10: performance: Passing the result of c_str() to a function that takes std::string as argument no. 6 is slow and redundant. [stlcstrParam] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:243:102: performance: Function parameter 'videosize' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:243:125: performance: Function parameter 'inputpixelformat' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:243:47: performance: Function parameter 'device' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:243:67: performance: Function parameter 'source' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:244:47: performance: Function parameter 'urlSource' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:247:5: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:273:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:343:19: style: Condition 'attempt<10' is always true [knownConditionTrueFalse] indi-webcam-1.0+20221222161740/indi_webcam.cpp:342:19: note: Assignment 'attempt=0', assigned value is 0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:345:27: note: Assuming condition is false indi-webcam-1.0+20221222161740/indi_webcam.cpp:343:19: note: Condition 'attempt<10' is always true 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:355:108: performance: Function parameter 'newInputPixelFormat' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:355:141: performance: Function parameter 'newVideosize' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:355:44: performance: Function parameter 'newDevice' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:355:67: performance: Function parameter 'newSource' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:365:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:409:101: performance: Function parameter 'newPort' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:409:122: performance: Function parameter 'newUserName' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:409:50: performance: Function parameter 'newProtocol' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:409:75: performance: Function parameter 'newIPAddress' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:410:48: performance: Function parameter 'newPassword' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:433:50: performance: Function parameter 'newURL' should be passed by const reference. [passedByValue] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:446:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:496:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:518:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:52:24: style: C-style pointer casting [cstyleCast] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:62:19: warning: Either the condition 'lineBuffer' is redundant or there is possible null pointer dereference: lineBuffer. [nullPointerRedundantCheck] indi-webcam-1.0+20221222161740/indi_webcam.cpp:64:16: note: Assuming that condition 'lineBuffer' is not redundant indi-webcam-1.0+20221222161740/indi_webcam.cpp:62:19: note: Null pointer dereference 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:68:19: warning: Either the condition 'lineBuffer' is redundant or there is possible null pointer dereference: lineBuffer. [nullPointerRedundantCheck] indi-webcam-1.0+20221222161740/indi_webcam.cpp:71:16: note: Assuming that condition 'lineBuffer' is not redundant indi-webcam-1.0+20221222161740/indi_webcam.cpp:68:19: note: Null pointer dereference 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:700:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ISS_ON [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:753:13: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:755:84: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ISS_ON [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:785:17: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:84:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:870:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:926:28: style: Variable 'svp' can be declared as pointer to const [constVariablePointer] 2.18.0 indi-webcam-1.0+20221222161740/indi_webcam.cpp:939:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBG_SESSION [valueFlowBailoutIncompleteVar] head indi-webcam-1.0+20221222161740/indi_webcam.h:213:0: error: failed to evaluate #if condition, undefined function-like macro invocation: AV_VERSION_INT( ... ) [preprocessorErrorDirective] head indi-webcam-1.0+20221222161740/indi_webcam.h:213:2: error: failed to evaluate #if condition, undefined function-like macro invocation: AV_VERSION_INT( ... ) [preprocessorErrorDirective] DONE