Newly introduced findings

List of Findings

Error: CLIPPY_WARNING: [#def1]
src/engine/strat_engine/backstore/blockdev/mod.rs:145:12: warning: associated function `from_bd` is never used
#      |
#  144 | impl LockedBlockdev {
#      | ------------------- associated function in this implementation
#  145 |     pub fn from_bd(bd: &dyn BlockDev) -> Self {
#      |            ^^^^^^^
#      |
#      = note: `-D dead-code` implied by `-D unused`
#      = help: to override `-D unused` add `#[allow(dead_code)]`

Error: CLIPPY_WARNING: [#def2]
src/engine/strat_engine/backstore/blockdev/mod.rs:169:9: warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value
#      |
#  169 |         self.user_info.as_ref().map(|s| s.as_str())
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.user_info.as_deref()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
#      = note: `-D clippy::option-as-ref-deref` implied by `-D clippy::all`
#      = help: to override `-D clippy::all` add `#[allow(clippy::option_as_ref_deref)]`

Error: CLIPPY_WARNING: [#def3]
src/engine/strat_engine/backstore/blockdev/mod.rs:173:9: warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value
#      |
#  173 |         self.hardware_info.as_ref().map(|s| s.as_str())
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.hardware_info.as_deref()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref

Error: CLIPPY_WARNING: [#def4]
src/engine/strat_engine/backstore/blockdev/mod.rs:185:9: warning: using `clone` on type `Option<Sectors>` which implements the `Copy` trait
#      |
#  185 |         self.new_size.clone()
#      |         ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.new_size`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
#      = note: `-D clippy::clone-on-copy` implied by `-D clippy::all`
#      = help: to override `-D clippy::all` add `#[allow(clippy::clone_on_copy)]`

Error: CLIPPY_WARNING: [#def5]
src/engine/strat_engine/pool/mod.rs:39:1: warning: more than 3 bools in a struct
#     |
#  39 | / pub struct LockedPool {
#  40 | |     blockdevs: Vec<(DevUuid, BlockDevTier, LockedBlockdev)>,
#  41 | |     filesystems: Vec<(Name, FilesystemUuid, LockedFilesystem)>,
#  42 | |     total_physical_size: Sectors,
#  ...  |
#  56 | |     volume_key_is_loaded: StratisResult<bool>,
#  57 | | }
#     | |_^
#     |
#     = help: consider using a state machine or refactoring bools into two-variant enums
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools
#     = note: requested on the command line with `-D clippy::struct-excessive-bools`

Error: CLIPPY_WARNING: [#def6]
src/engine/strat_engine/pool/mod.rs:60:8: warning: associated function `from_pool` is never used
#     |
#  59 | impl LockedPool {
#     | --------------- associated function in this implementation
#  60 |     fn from_pool(p: &dyn Pool, pool_uuid: PoolUuid) -> Self {
#     |        ^^^^^^^^^

Error: CLIPPY_WARNING: [#def7]
src/engine/strat_engine/pool/mod.rs:197:9: warning: using `clone` on type `Option<Sectors>` which implements the `Copy` trait
#      |
#  197 |         self.total_physical_used.clone()
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.total_physical_used`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Error: CLIPPY_WARNING: [#def8]
src/engine/strat_engine/thinpool/filesystem.rs:615:12: warning: associated function `from_fs` is never used
#      |
#  614 | impl LockedFilesystem {
#      | --------------------- associated function in this implementation
#  615 |     pub fn from_fs(fs: &dyn Filesystem) -> Self {
#      |            ^^^^^^^

Error: CLIPPY_WARNING: [#def9]
src/engine/strat_engine/thinpool/filesystem.rs:650:9: warning: using `clone` on type `Option<Sectors>` which implements the `Copy` trait
#      |
#  650 |         self.size_limit.clone()
#      |         ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.size_limit`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Error: CLIPPY_WARNING: [#def10]
src/engine/strat_engine/thinpool/filesystem.rs:654:9: warning: using `clone` on type `Option<FilesystemUuid>` which implements the `Copy` trait
#      |
#  654 |         self.origin.clone()
#      |         ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.origin`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Scan Properties

analyzer-version-clippy1.88.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.1.1
analyzer-version-gcc-analyzer15.1.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.88.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.1.1
diffbase-analyzer-version-gcc-analyzer15.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-178.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namestratisd-3.9.0~pre-202507221323git73cff99c
diffbase-store-results-to/tmp/tmptwzor4hn/stratisd-3.9.0~pre-202507221323git73cff99c.tar.xz
diffbase-time-created2025-07-22 14:33:54
diffbase-time-finished2025-07-22 14:43:31
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,cppcheck,clippy,gcc' '-o' '/tmp/tmptwzor4hn/stratisd-3.9.0~pre-202507221323git73cff99c.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmptwzor4hn/stratisd-3.9.0~pre-202507221323git73cff99c.src.rpm'
diffbase-tool-versioncsmock-3.8.2-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-178.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namestratisd-3.9.0~pre-202507221410git652d5e52
store-results-to/tmp/tmpupov42zj/stratisd-3.9.0~pre-202507221410git652d5e52.tar.xz
time-created2025-07-22 14:43:53
time-finished2025-07-22 14:52:45
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,cppcheck,clippy,gcc' '-o' '/tmp/tmpupov42zj/stratisd-3.9.0~pre-202507221410git652d5e52.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpupov42zj/stratisd-3.9.0~pre-202507221410git652d5e52.src.rpm'
tool-versioncsmock-3.8.2-1.el9