Error: CLIPPY_WARNING: [#def1] src/cache/dump.rs:125:29: warning: this pattern reimplements `Option::unwrap_or` # | # 125 | let dirty = if let Some(bit) = inner.dirty_bits.contains(cblock as usize) { # | _____________________________^ # 126 | | bit # 127 | | } else { # ... | # 130 | | }; # | |_________________^ help: replace with: `inner.dirty_bits.contains(cblock as usize).unwrap_or(true)` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or # = note: `#[warn(clippy::manual_unwrap_or)]` on by default Error: CLIPPY_WARNING: [#def2] src/cache/dump.rs:153:26: warning: hiding a lifetime that's named elsewhere is confusing # | # 153 | pub fn new(emitter: &'a mut dyn MetadataVisitor, valid_mappings: FixedBitSet) -> HintEmitter { # | ^^ the lifetime is named here ----------- the same lifetime is hidden here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default # help: consistently use `'a` # | # 153 | pub fn new(emitter: &'a mut dyn MetadataVisitor, valid_mappings: FixedBitSet) -> HintEmitter<'a> { # | ++++ Error: CLIPPY_WARNING: [#def3] src/commands/utils.rs:166:30: warning: this `map_or` can be simplified # | # 166 | let is_broken_pipe = root_cause # | ______________________________^ # 167 | | .downcast_ref::<Arc<std::io::Error>>() // quick_xml::Error::Io wraps io::Error in Arc # 168 | | .map_or_else( # 169 | | || root_cause.downcast_ref::<std::io::Error>(), # ... | # 172 | | .map_or(false, |err| err.kind() == std::io::ErrorKind::BrokenPipe); # | |______________________________________________________________________________^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or # = note: `#[warn(clippy::unnecessary_map_or)]` on by default # help: use is_some_and instead # | # 172 - .map_or(false, |err| err.kind() == std::io::ErrorKind::BrokenPipe); # 172 + .is_some_and(|err| err.kind() == std::io::ErrorKind::BrokenPipe); # | Error: CLIPPY_WARNING: [#def4] src/era/dump.rs:29:26: warning: hiding a lifetime that's named elsewhere is confusing # | # 29 | pub fn new(emitter: &'a mut dyn MetadataVisitor) -> EraEmitter { # | ^^ the lifetime is named here ---------- the same lifetime is hidden here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # help: consistently use `'a` # | # 29 | pub fn new(emitter: &'a mut dyn MetadataVisitor) -> EraEmitter<'a> { # | ++++ Error: CLIPPY_WARNING: [#def5] src/file_utils.rs:49:13: warning: this can be `std::io::Error::other(_)` # | # 49 | let e = io::Error::new(io::ErrorKind::Other, msg); # | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error # = note: `#[warn(clippy::io_other_error)]` on by default # help: use `std::io::Error::other` # | # 49 - let e = io::Error::new(io::ErrorKind::Other, msg); # 49 + let e = io::Error::other(msg); # | Error: CLIPPY_WARNING: [#def6] src/io_engine/spindle.rs:27:1: warning: empty lines after doc comment # | # 27 | / /// Writes or reads to blocks not in the space map fall back to sync io. # ... | # 30 | | # | |_^ # 31 | fn pack_block<W: io::Write>(w: &mut W, kind: BT, buf: &[u8]) -> Result<()> { # | ------------- the comment documents this function # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments # = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default # = help: if the empty lines are unintentional, remove them # help: if the doc comment should not document function `pack_block` then comment it out # | # 22 ~ // /// Examining BTrees can lead to a lot of random io, which can be # 23 ~ // /// very slow on spindle devices. This io engine reads in all # 24 ~ // /// metadata blocks of interest (we know these from the metadata # 25 ~ // /// space map), compresses them and caches them in memory. This # 26 ~ // /// greatly speeds up performance but obviously uses a lot of memory. # 27 ~ // /// Writes or reads to blocks not in the space map fall back to sync io. # | Error: CLIPPY_WARNING: [#def7] src/io_engine/spindle.rs:151:46: warning: this can be `std::io::Error::other(_)` # | # 151 | unpack_block(z, loc).map_err(|_| io::Error::new(io::ErrorKind::Other, "unpack failed")) # | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error # help: use `std::io::Error::other` # | # 151 - unpack_block(z, loc).map_err(|_| io::Error::new(io::ErrorKind::Other, "unpack failed")) # 151 + unpack_block(z, loc).map_err(|_| io::Error::other("unpack failed")) # | Error: CLIPPY_WARNING: [#def8] src/io_engine/sync.rs:48:13: warning: this can be `std::io::Error::other(_)` # | # 48 | Err(io::Error::new(io::ErrorKind::Other, "read failed")) # | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error # help: use `std::io::Error::other` # | # 48 - Err(io::Error::new(io::ErrorKind::Other, "read failed")) # 48 + Err(io::Error::other("read failed")) # | Error: CLIPPY_WARNING: [#def9] src/io_engine/sync.rs:52:9: warning: this can be `std::io::Error::other(_)` # | # 52 | io::Error::new(io::ErrorKind::Other, "write failed") # | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error # help: use `std::io::Error::other` # | # 52 - io::Error::new(io::ErrorKind::Other, "write failed") # 52 + io::Error::other("write failed") # | Error: CLIPPY_WARNING: [#def10] src/pack/toplevel.rs:29:18: warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do # | # 29 | fn shuffle<T>(v: &mut Vec<T>) { # | ^^^^^^^^^^^ help: change this to: `&mut [T]` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg # = note: `#[warn(clippy::ptr_arg)]` on by default Error: CLIPPY_WARNING: [#def11] src/pdata/bitset.rs:145:15: warning: manual implementation of `err` # | # 145 | let err = match w.walk(&v, root) { # | _______________^ # 146 | | Ok(()) => None, # 147 | | Err(e) => Some(e), # 148 | | }; # | |_____^ help: replace with: `w.walk(&v, root).err()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err # = note: `#[warn(clippy::manual_ok_err)]` on by default Error: CLIPPY_WARNING: [#def12] src/pdata/bitset.rs:162:15: warning: manual implementation of `err` # | # 162 | let err = match w.walk(&v, root) { # | _______________^ # 163 | | Ok(()) => None, # 164 | | Err(e) => Some(e), # 165 | | }; # | |_____^ help: replace with: `w.walk(&v, root).err()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err Error: CLIPPY_WARNING: [#def13] src/thin/ls.rs:144:21: warning: hiding a lifetime that's named elsewhere is confusing # | # 144 | fn new(fields: &'a [OutputField], nr_rows: usize, bs: u32) -> LsTable { # | ^^ the lifetime is named here ------- the same lifetime is hidden here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # help: consistently use `'a` # | # 144 | fn new(fields: &'a [OutputField], nr_rows: usize, bs: u32) -> LsTable<'a> { # | ++++ Error: CLIPPY_WARNING: [#def14] src/thin/trim.rs:29:22: warning: hiding a lifetime that's named elsewhere is confusing # | # 29 | fn new(bitmaps: &'a [Block], nr_blocks: u64) -> Result<RangeIterator> { # | ^^ the lifetime is named here ------------- the same lifetime is hidden here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # help: consistently use `'a` # | # 29 | fn new(bitmaps: &'a [Block], nr_blocks: u64) -> Result<RangeIterator<'a>> { # | ++++ Error: CLIPPY_WARNING: [#def15] src/utils/hashvec.rs:63:19: warning: hiding a lifetime that's elided elsewhere is confusing # | # 63 | pub fn values(&self) -> std::slice::Iter<T> { # | ^^^^^ ------------------- the same lifetime is hidden here # | | # | the lifetime is elided here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # help: use `'_` for type paths # | # 63 | pub fn values(&self) -> std::slice::Iter<'_, T> { # | +++ Error: CLIPPY_WARNING: [#def16] src/xml.rs:58:33: warning: hiding a lifetime that's elided elsewhere is confusing # | # 58 | pub fn mk_attr<T: Display>(key: &[u8], value: T) -> Attribute { # | ^^^^^ --------- the same lifetime is hidden here # | | # | the lifetime is elided here # | # = help: the same lifetime is referred to in inconsistent ways, making the signature confusing # help: use `'_` for type paths # | # 58 | pub fn mk_attr<T: Display>(key: &[u8], value: T) -> Attribute<'_> { # | ++++
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.90.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-162.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
| diffbase-project-name | device-mapper-persistent-data-1.3.0-1.fc44 |
| diffbase-store-results-to | /tmp/tmpw7o9thrb/device-mapper-persistent-data-1.3.0-1.fc44.tar.xz |
| diffbase-time-created | 2025-10-28 17:42:29 |
| diffbase-time-finished | 2025-10-28 17:46:12 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpw7o9thrb/device-mapper-persistent-data-1.3.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpw7o9thrb/device-mapper-persistent-data-1.3.0-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-162.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | device-mapper-persistent-data-1.1.0-4.fc43 |
| store-results-to | /tmp/tmpnjy6t4gu/device-mapper-persistent-data-1.1.0-4.fc43.tar.xz |
| time-created | 2025-10-28 17:38:22 |
| time-finished | 2025-10-28 17:42:15 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpnjy6t4gu/device-mapper-persistent-data-1.1.0-4.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpnjy6t4gu/device-mapper-persistent-data-1.1.0-4.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |