2025-10-24 00:29 ftp://ftp.de.debian.org/debian/pool/main/s/spacenavd/spacenavd_1.3.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=motif --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.17.0-5-generic-x86_64-with-glibc2.42 python: 3.13.7 client-version: 1.3.69 compiler: g++ (Ubuntu 15.2.0-4ubuntu4) 15.2.0 cppcheck: head 2.18.0 head-info: 19faaee (2025-10-23 11:36:05 +0200) count: 70 66 elapsed-time: 10.2 10.0 head-timing-info: old-timing-info: head results: spacenavd-1.3.1/src/cfgfile.c:114:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_UNLCK [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/cfgfile.c:139:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/cfgfile.c:468:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/cfgfile.c:192:18: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] spacenavd-1.3.1/src/cfgfile.c:196:18: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] spacenavd-1.3.1/src/cfgfile.c:758:14: style: Variable 'val' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/cfgfile.c:791:8: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/client.c:118:36: style: Parameter 'client' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/client.c:123:38: style: Parameter 'client' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/client.c:140:45: style: Parameter 'client' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/dev.c:132:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev.c:178:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_WARNING [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev.c:256:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev.c:267:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev.c:316:37: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/dev.c:318:17: style: Variable 'iter' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/dev.c:126:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] spacenavd-1.3.1/src/dev.c:167:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] spacenavd-1.3.1/src/dev_serial.c:118:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:255:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VMIN [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:286:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ICANON [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:320:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TIOCMGET [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:325:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TCSAFLUSH [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:367:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_WARNING [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:450:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_WARNING [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:626:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_DEBUG [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:672:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_serial.c:430:11: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] spacenavd-1.3.1/src/dev_serial.c:482:18: style: Condition 'sb->mot[i]!=prev' is always false [knownConditionTrueFalse] spacenavd-1.3.1/src/dev_serial.c:478:9: note: prev is assigned 'sb->mot[i]' here. spacenavd-1.3.1/src/dev_serial.c:482:18: note: Condition 'sb->mot[i]!=prev' is always false spacenavd-1.3.1/src/dev_serial.c:719:34: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] spacenavd-1.3.1/src/dev_serial.c:336:8: style: Variable 'end' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/dev_serial.c:426:11: style: Variable 'rd' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/dev_usb.c:67:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dev_usb.c:59:12: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] spacenavd-1.3.1/src/dev_usb.c:51:8: style: Variable 'devname' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/dev_usb.c:51:18: style: Variable 'buf' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/dummy_usb.c:30:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/dummy_usb.c:34:33: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/event.c:108:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/event.c:191:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/event.c:275:39: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/event.c:279:39: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/event.c:283:39: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/event.c:268:47: style:inconclusive: Function 'handle_button_action' argument 2 names different: declaration 'val' definition 'pressed'. [funcArgNamesDifferent] spacenavd-1.3.1/src/event.c:53:47: note: Function 'handle_button_action' argument 2 names different: declaration 'val' definition 'pressed'. spacenavd-1.3.1/src/event.c:268:47: note: Function 'handle_button_action' argument 2 names different: declaration 'val' definition 'pressed'. spacenavd-1.3.1/src/event.c:324:46: style:inconclusive: Function 'dispatch_event' argument 1 names different: declaration 'dev' definition 'dev_ev'. [funcArgNamesDifferent] spacenavd-1.3.1/src/event.c:54:46: note: Function 'dispatch_event' argument 1 names different: declaration 'dev' definition 'dev_ev'. spacenavd-1.3.1/src/event.c:324:46: note: Function 'dispatch_event' argument 1 names different: declaration 'dev' definition 'dev_ev'. spacenavd-1.3.1/src/event.c:118:61: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/event.c:306:20: style: Variable 'dev_ev' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/event.c:327:17: style: Variable 'client_dev' can be declared as pointer to const [constVariablePointer] spacenavd-1.3.1/src/event.c:366:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] spacenavd-1.3.1/src/logger.c:29:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/logger.c:53:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/proto.c:26:7: warning: Either the condition 'str' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] spacenavd-1.3.1/src/proto.c:22:6: note: Assuming that condition 'str' is not redundant spacenavd-1.3.1/src/proto.c:26:7: note: Null pointer addition spacenavd-1.3.1/src/proto_unix.c:56:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/proto_unix.c:171:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/proto_unix.c:188:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/proto_unix.c:294:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_DEBUG [valueFlowBailoutIncompleteVar] spacenavd-1.3.1/src/proto_unix.c:263:33: style: Condition 'handle_request(c,req)==-1' is always false [knownConditionTrueFalse] spacenavd-1.3.1/src/proto_unix.c:263:24: note: Calling function 'handle_request' returns 0 spacenavd-1.3.1/src/proto_unix.c:263:33: note: Condition 'handle_request(c,req)==-1' is always false spacenavd-1.3.1/src/proto_unix.c:245:14: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:311:11: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:323:19: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:391:11: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:402:19: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:408:15: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:424:20: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:425:24: portability: Casting from float * to signed int * is not portable due to different binary data representations on different platforms. [invalidPointerCast] spacenavd-1.3.1/src/proto_unix.c:174:28: style: Parameter 'rset' can be declared as pointer to const [constParameterPointer] spacenavd-1.3.1/src/proto_unix.c:289:9: style: Unused variable: idx [unusedVariable] spacenavd-1.3.1/src/proto_unix.c:292:14: style: Variable 'str' is assigned a value that is never used. [unreadVariable] spacenavd-1.3.1/src/spnavd.c:100:26: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] spacenavd-1.3.1/src/xdetect.c:38:32: style: Parameter 'rset' can be declared as pointer to const [constParameterPointer] diff: head spacenavd-1.3.1/src/dev.c:126:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] head spacenavd-1.3.1/src/dev.c:167:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] head spacenavd-1.3.1/src/dev.c:318:17: style: Variable 'iter' can be declared as pointer to const [constVariablePointer] head spacenavd-1.3.1/src/event.c:366:14: portability: Zero initializing union 'ev' does not guarantee its complete storage to be zero initialized as its largest member is not declared as the first member. Consider making motion the first member or favor memset(). [UnionZeroInit] DONE