2025-06-30 20:12 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 -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.17.0 head-info: dfa16af (2025-06-30 19:43:56 +0200) count: 66 66 elapsed-time: 35.4 32.6 head-timing-info: old-timing-info: head results: 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/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/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/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_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/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/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/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/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/xdetect.c:38:32: style: Parameter 'rset' can be declared as pointer to const [constParameterPointer] 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/dev.c:316:37: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] 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/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/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/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] diff: DONE