2025-08-29 11:38 ftp://ftp.de.debian.org/debian/pool/main/v/vhba-module/vhba-module_20250329.orig.tar.xz 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 -j4 platform: Linux-6.12.41+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 327ef3c (2025-08-29 11:03:21 +0200) count: 2 30 elapsed-time: 0.0 0.2 head-timing-info: old-timing-info: head results: vhba-module-20250329/vhba.c:29:0: error: failed to evaluate #if condition, undefined function-like macro invocation: KERNEL_VERSION( ... ) [preprocessorErrorDirective] vhba-module-20250329/vhba.c:29:2: error: failed to evaluate #if condition, undefined function-like macro invocation: KERNEL_VERSION( ... ) [preprocessorErrorDirective] diff: 2.18.0 vhba-module-20250329/vhba.c:1010:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:1076:43: style: Parameter 'dev' can be declared as pointer to const. However it seems that 'vhba_release' is a callback function, if 'dev' is declared with const you might also need to cast function pointer(s). [constParameterCallback] vhba-module-20250329/vhba.c:1085:20: note: You might need to cast the function pointer here vhba-module-20250329/vhba.c:1076:43: note: Parameter 'dev' can be declared as pointer to const 2.18.0 vhba-module-20250329/vhba.c:160:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GFP_KERNEL [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:192:23: style: Variable 'vhost' can be declared as pointer to const [constVariablePointer] 2.18.0 vhba-module-20250329/vhba.c:196:11: style: Variable 'vhost' is assigned a value that is never used. [unreadVariable] 2.18.0 vhba-module-20250329/vhba.c:200:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCSI_MLQUEUE_HOST_BUSY [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:226:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable entry [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:227:19: error: Uninitialized variable: vcmd->cmd [uninitvar] head vhba-module-20250329/vhba.c:29:0: error: failed to evaluate #if condition, undefined function-like macro invocation: KERNEL_VERSION( ... ) [preprocessorErrorDirective] head vhba-module-20250329/vhba.c:29:2: error: failed to evaluate #if condition, undefined function-like macro invocation: KERNEL_VERSION( ... ) [preprocessorErrorDirective] 2.18.0 vhba-module-20250329/vhba.c:362:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EBUSY [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:491:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DID_NO_CONNECT [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:511:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SUCCESS [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:562:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMA_TO_DEVICE [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:627:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCSI_SENSE_BUFFERSIZE [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:699:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable entry [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:700:19: error: Uninitialized variable: vcmd->status [uninitvar] 2.18.0 vhba-module-20250329/vhba.c:716:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable entry [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:717:19: error: Uninitialized variable: vcmd->metatag [uninitvar] 2.18.0 vhba-module-20250329/vhba.c:735:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable current [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:756:44: style: Parameter 'file' can be declared as pointer to const. However it seems that 'vhba_ctl_read' is a callback function, if 'file' is declared with const you might also need to cast function pointer(s). [constParameterCallback] vhba-module-20250329/vhba.c:985:13: note: You might need to cast the function pointer here vhba-module-20250329/vhba.c:756:44: note: Parameter 'file' can be declared as pointer to const 2.18.0 vhba-module-20250329/vhba.c:766:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_NONBLOCK [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:801:45: style: Parameter 'file' can be declared as pointer to const. However it seems that 'vhba_ctl_write' is a callback function, if 'file' is declared with const you might also need to cast function pointer(s). [constParameterCallback] vhba-module-20250329/vhba.c:986:14: note: You might need to cast the function pointer here vhba-module-20250329/vhba.c:801:45: note: Parameter 'file' can be declared as pointer to const 2.18.0 vhba-module-20250329/vhba.c:810:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:854:42: style: Parameter 'file' can be declared as pointer to const. However it seems that 'vhba_ctl_ioctl' is a callback function, if 'file' is declared with const you might also need to cast function pointer(s). [constParameterCallback] vhba-module-20250329/vhba.c:988:23: note: You might need to cast the function pointer here vhba-module-20250329/vhba.c:854:42: note: Parameter 'file' can be declared as pointer to const 2.18.0 vhba-module-20250329/vhba.c:856:25: style: Variable 'vdev' can be declared as pointer to const [constVariablePointer] 2.18.0 vhba-module-20250329/vhba.c:868:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EFAULT [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:905:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLLIN [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:921:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENODEV [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:944:64: style: Parameter 'file' can be declared as pointer to const. However it seems that 'vhba_ctl_release' is a callback function, if 'file' is declared with const you might also need to cast function pointer(s). [constParameterCallback] vhba-module-20250329/vhba.c:984:16: note: You might need to cast the function pointer here vhba-module-20250329/vhba.c:944:64: note: Parameter 'file' can be declared as pointer to const 2.18.0 vhba-module-20250329/vhba.c:958:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable entry [valueFlowBailoutIncompleteVar] 2.18.0 vhba-module-20250329/vhba.c:968:27: error: Uninitialized variables: vcmd.status, vcmd.entry [uninitvar] DONE