2025-11-16 23:13 ftp://ftp.de.debian.org/debian/pool/main/s/stenc/stenc_1.0.7.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 -j4 platform: Linux-6.12.48+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: 2ad4620 (2025-11-14 19:45:56 +0100) count: 74 72 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: stenc-1.0.7/src/keyinfo.cpp:20:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/keyinfo.cpp:88:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable hex [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:175:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_TAPE_READ_BLOCKS [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:221:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DEFAULT_CEEM [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:353:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:433:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:441:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DEFAULT_ALGORITHM [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:483:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:509:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/scsiencrypt.cpp:562:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/keyinfo.cpp:12:2: performance: Variable 'check' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] stenc-1.0.7/src/keyinfo.cpp:92:9: warning: Class 'Keyinfo' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] stenc-1.0.7/src/keyinfo.cpp:92:9: warning: Class 'Keyinfo' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] stenc-1.0.7/src/scsiencrypt.h:331:3: style: Class 'SSP_NBES' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] stenc-1.0.7/src/scsiencrypt.h:337:17: style: Class 'SSP_DES' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] stenc-1.0.7/src/main.cpp:90:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:337:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:344:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:349:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:367:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:466:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:534:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ECHO [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/main.cpp:551:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cout [valueFlowBailoutIncompleteVar] stenc-1.0.7/src/keyinfo.cpp:16:27: performance: Function parameter 'hexinput' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:442:2: performance: Variable 'cryptoKey' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] stenc-1.0.7/src/scsiencrypt.cpp:444:2: performance: Variable 'keyName' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] stenc-1.0.7/src/scsiencrypt.cpp:141:17: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:160:17: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:194:18: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:216:11: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:238:13: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:246:12: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:248:28: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:256:12: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:263:26: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:268:11: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:287:10: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:289:10: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/scsiencrypt.cpp:143:17: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] stenc-1.0.7/src/scsiencrypt.cpp:162:17: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] stenc-1.0.7/src/scsiencrypt.cpp:196:17: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] stenc-1.0.7/src/scsiencrypt.cpp:369:21: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] stenc-1.0.7/src/scsiencrypt.cpp:461:16: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] stenc-1.0.7/src/scsiencrypt.cpp:295:25: style:inconclusive: Function 'SCSIExecute' argument 1 names different: declaration 'tapedevice' definition 'tapedrive'. [funcArgNamesDifferent] stenc-1.0.7/src/scsiencrypt.cpp:64:25: note: Function 'SCSIExecute' argument 1 names different: declaration 'tapedevice' definition 'tapedrive'. stenc-1.0.7/src/scsiencrypt.cpp:295:25: note: Function 'SCSIExecute' argument 1 names different: declaration 'tapedevice' definition 'tapedrive'. stenc-1.0.7/src/scsiencrypt.cpp:137:27: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:155:29: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:190:38: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:208:37: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:295:25: performance: Function parameter 'tapedrive' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:481:27: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/scsiencrypt.cpp:461:8: style: Variable 'rawbuff' can be declared as pointer to const [constVariablePointer] stenc-1.0.7/src/scsiencrypt.cpp:265:40: error: Uninitialized variable: &kad.res_bits_1 [uninitvar] stenc-1.0.7/src/main.cpp:543:55: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] stenc-1.0.7/src/main.cpp:350:13: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:353:13: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:356:13: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:445:38: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:451:52: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:502:19: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:508:19: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:543:26: style: C-style pointer casting [cstyleCast] stenc-1.0.7/src/main.cpp:273:14: style: The scope of the variable 'keyInput' can be reduced. [variableScope] stenc-1.0.7/src/main.cpp:363:29: style:inconclusive: Function 'showDriveStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. [funcArgNamesDifferent] stenc-1.0.7/src/main.cpp:62:29: note: Function 'showDriveStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. stenc-1.0.7/src/main.cpp:363:29: note: Function 'showDriveStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. stenc-1.0.7/src/main.cpp:462:30: style:inconclusive: Function 'showVolumeStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. [funcArgNamesDifferent] stenc-1.0.7/src/main.cpp:63:30: note: Function 'showVolumeStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. stenc-1.0.7/src/main.cpp:462:30: note: Function 'showVolumeStatus' argument 1 names different: declaration 'tapeDevice' definition 'tapeDrive'. stenc-1.0.7/src/main.cpp:336:22: performance: Function parameter 'message' should be passed by const reference. [passedByValue] stenc-1.0.7/src/main.cpp:347:26: performance: Function parameter 'tapeDevice' should be passed by const reference. [passedByValue] stenc-1.0.7/src/main.cpp:363:29: performance: Function parameter 'tapeDrive' should be passed by const reference. [passedByValue] stenc-1.0.7/src/main.cpp:462:30: performance: Function parameter 'tapeDrive' should be passed by const reference. [passedByValue] stenc-1.0.7/src/main.cpp:48:16: style: struct member 'bitcheck::bit8' is never used. [unusedStructMember] stenc-1.0.7/src/main.cpp:49:16: style: struct member 'bitcheck::bit7' is never used. [unusedStructMember] stenc-1.0.7/src/main.cpp:50:16: style: struct member 'bitcheck::bit6' is never used. [unusedStructMember] stenc-1.0.7/src/main.cpp:52:16: style: struct member 'bitcheck::bit4' is never used. [unusedStructMember] stenc-1.0.7/src/main.cpp:53:16: style: struct member 'bitcheck::bit3' is never used. [unusedStructMember] stenc-1.0.7/src/main.cpp:55:16: style: struct member 'bitcheck::bit1' is never used. [unusedStructMember] diff: head stenc-1.0.7/src/keyinfo.cpp:92:9: warning: Class 'Keyinfo' does not have a copy constructor which is recommended since it has dynamic memory/resource management. [noCopyConstructor] head stenc-1.0.7/src/keyinfo.cpp:92:9: warning: Class 'Keyinfo' does not have a operator= which is recommended since it has dynamic memory/resource management. [noOperatorEq] DONE