rust-rpm-sequoia-1.10.0-1.fc44

List of Findings

Error: CLIPPY_WARNING: [#def1]
build.rs:33:22: warning: unexpected `cfg` condition value: `crypto-botan`
#     |
#  33 |              if cfg!(feature = "crypto-botan") {
#     |                      ^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = note: expected values for `feature` are: `crypto-nettle`, `crypto-openssl`, `crypto-rust`, and `default`
#     = help: consider adding `crypto-botan` as a feature in `Cargo.toml`
#     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
#     = note: `#[warn(unexpected_cfgs)]` on by default

Error: CLIPPY_WARNING: [#def2]
build.rs:35:29: warning: unexpected `cfg` condition value: `crypto-botan2`
#     |
#  35 |              } else if cfg!(feature = "crypto-botan2") {
#     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = note: expected values for `feature` are: `crypto-nettle`, `crypto-openssl`, `crypto-rust`, and `default`
#     = help: consider adding `crypto-botan2` as a feature in `Cargo.toml`
#     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Error: CLIPPY_WARNING: [#def3]
build.rs:41:29: warning: unexpected `cfg` condition value: `crypto-cng`
#     |
#  41 |              } else if cfg!(feature = "crypto-cng") {
#     |                             ^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = note: expected values for `feature` are: `crypto-nettle`, `crypto-openssl`, `crypto-rust`, and `default`
#     = help: consider adding `crypto-cng` as a feature in `Cargo.toml`
#     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Error: CLIPPY_WARNING: [#def4]
build.rs:41:53: warning: this `if` has identical blocks
#     |
#  41 |                } else if cfg!(feature = "crypto-cng") {
#     |  _____________________________________________________^
#  42 | |                  ""
#  43 | |              } else if cfg!(feature = "crypto-rust") {
#     | |______________^
#     |
#  note: same as this
#    --> build.rs:43:54
#     |
#  43 |                } else if cfg!(feature = "crypto-rust") {
#     |  ______________________________________________________^
#  44 | |                  ""
#  45 | |              } else {
#     | |______________^
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#if_same_then_else
#     = note: `#[warn(clippy::if_same_then_else)]` on by default

Error: CLIPPY_WARNING: [#def5]
src/digest.rs:118:14: warning: called `map(..).flatten()` on `Iterator`
#      |
#  118 |               .map(|x| {
#      |  ______________^
#  119 | |                 let x = format!("{:02x}", x);
#  120 | |                 let x = x.as_bytes();
#  121 | |                 std::iter::once(x[0]).chain(std::iter::once(x[1]))
#  122 | |             })
#  123 | |             .flatten()
#      | |______________________^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#map_flatten
#      = note: `#[warn(clippy::map_flatten)]` on by default
#  help: try replacing `map` with `flat_map` and remove the `.flatten()`
#      |
#  118 ~             .flat_map(|x| {
#  119 +                 let x = format!("{:02x}", x);
#  120 +                 let x = x.as_bytes();
#  121 +                 std::iter::once(x[0]).chain(std::iter::once(x[1]))
#  122 +             })
#      |

Error: CLIPPY_WARNING: [#def6]
src/ffi.rs:4:28: warning: unneeded unit return type
#    |
#  4 | pub(crate) fn unit<T>(_: T) -> () { () }
#    |                            ^^^^^^ help: remove the `-> ()`
#    |
#    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unused_unit

Error: CLIPPY_WARNING: [#def7]
src/ffi.rs:4:37: warning: unneeded unit expression
#    |
#  4 | pub(crate) fn unit<T>(_: T) -> () { () }
#    |                                     ^^ help: remove the final `()`
#    |
#    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unused_unit
#    = note: `#[warn(clippy::unused_unit)]` on by default

Error: CLIPPY_WARNING: [#def8]
src/ffi.rs:351:14: warning: unused macro definition: `move_option_to_c`
#      |
#  351 | macro_rules! move_option_to_c {
#      |              ^^^^^^^^^^^^^^^^
#      |
#      = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default

Error: CLIPPY_WARNING: [#def9]
src/lib.rs:235:32: warning: constants have by default a `'static` lifetime
#      |
#  235 | const RPM_SEQUOIA_CONFIG_ENV: &'static str
#      |                               -^^^^^^^---- help: consider removing `'static`: `&str`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_static_lifetimes
#      = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default

Error: CLIPPY_WARNING: [#def10]
src/lib.rs:334:12: warning: hiding a lifetime that's elided elsewhere is confusing
#      |
#  334 |     fn key(&self) -> Option<ErasedKeyAmalgamation<PublicParts>> {
#      |            ^^^^^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
#      = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
#  help: use `'_` for type paths
#      |
#  334 |     fn key(&self) -> Option<ErasedKeyAmalgamation<'_, PublicParts>> {
#      |                                                   +++

Error: CLIPPY_WARNING: [#def11]
src/lib.rs:697:8: warning: length comparison to zero
#      |
#  697 |     if lints.len() > 0 {
#      |        ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lints.is_empty()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero
#      = note: `#[warn(clippy::len_zero)]` on by default

Error: CLIPPY_WARNING: [#def12]
src/lib.rs:715:13: warning: useless use of `format!`
#      |
#  715 | /             format!(
#  716 | |                 "Verifying a signature, but no certificate was \
#  717 | |                  provided:")
#      | |____________________________^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
#      = note: `#[warn(clippy::useless_format)]` on by default
#  help: consider using `.to_string()`
#      |
#  715 ~             "Verifying a signature, but no certificate was \
#  716 +                  provided:".to_string()
#      |

Error: CLIPPY_WARNING: [#def13]
src/lib.rs:945:21: warning: unneeded `return` statement
#      |
#  945 | /                     return Err(Error::NotTrusted(
#  946 | |                         "Verification relies on legacy crypto".into())
#  947 | |                                .into());
#      | |_______________________________________^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
#      = note: `#[warn(clippy::needless_return)]` on by default
#  help: remove `return`
#      |
#  945 ~                     Err(Error::NotTrusted(
#  946 +                         "Verification relies on legacy crypto".into())
#  947 ~                                .into())
#      |

Error: CLIPPY_WARNING: [#def14]
src/lib.rs:945:32: warning: useless conversion to the same type: `rpm::Error`
#      |
#  945 |                       return Err(Error::NotTrusted(
#      |  ________________________________^
#  946 | |                         "Verification relies on legacy crypto".into())
#  947 | |                                .into());
#      | |______________________________________^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion
#      = note: `#[warn(clippy::useless_conversion)]` on by default
#  help: consider removing `.into()`
#      |
#  945 ~                     return Err(Error::NotTrusted(
#  946 ~                         "Verification relies on legacy crypto".into()));
#      |

Error: CLIPPY_WARNING: [#def15]
src/lib.rs:949:21: warning: unneeded `return` statement
#      |
#  949 |                     return Ok(());
#      |                     ^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
#  help: remove `return`
#      |
#  949 -                     return Ok(());
#  949 +                     Ok(())
#      |

Error: CLIPPY_WARNING: [#def16]
src/lib.rs:986:31: warning: this operation has no effect
#      |
#  986 |                 sig_data.push((l >> 0) as u8);
#      |                               ^^^^^^^^ help: consider reducing it to: `l`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#identity_op
#      = note: `#[warn(clippy::identity_op)]` on by default

Error: CLIPPY_WARNING: [#def17]
src/lib.rs:998:31: warning: this operation has no effect
#      |
#  998 |                 sig_data.push((sig_len >>  0) as u8);
#      |                               ^^^^^^^^^^^^^^^ help: consider reducing it to: `sig_len`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#identity_op

Error: CLIPPY_WARNING: [#def18]
src/lib.rs:1009:31: warning: this operation has no effect
#       |
#  1009 |                 sig_data.push((ct >>  0) as u8);
#       |                               ^^^^^^^^^^ help: consider reducing it to: `ct`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#identity_op

Error: CLIPPY_WARNING: [#def19]
src/lib.rs:1022:13: warning: it looks like the same item is being pushed into this `Vec`
#       |
#  1022 |             digest.push(0);
#       |             ^^^^^^
#       |
#       = help: consider using `vec![0;SIZE]`
#       = help: or `digest.extend(std::iter::repeat_n(0, SIZE))`
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#same_item_push
#       = note: `#[warn(clippy::same_item_push)]` on by default

Error: CLIPPY_WARNING: [#def20]
src/lib.rs:1033:9: warning: unneeded `return` statement
#       |
#  1033 | /         return Err(Error::NoKey(
#  1034 | |             format!("Not provided (issuer: {})", issuer).into()));
#       | |_________________________________________________________________^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
#  help: remove `return`
#       |
#  1033 ~         Err(Error::NoKey(
#  1034 ~             format!("Not provided (issuer: {})", issuer).into()))
#       |

Error: CLIPPY_WARNING: [#def21]
src/lib.rs:1034:13: warning: useless conversion to the same type: `std::string::String`
#       |
#  1034 |             format!("Not provided (issuer: {})", issuer).into()));
#       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Not provided (issuer: {})", issuer)`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion

Error: CLIPPY_WARNING: [#def22]
src/lib.rs:1223:37: warning: casting to the same type is unnecessary (`u32` -> `u32`)
#       |
#  1223 |                 Ok(BodyLength::Full(bio.read_be_u32()? as u32)),
#       |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bio.read_be_u32()?`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast
#       = note: `#[warn(clippy::unnecessary_cast)]` on by default

Error: CLIPPY_WARNING: [#def23]
src/lib.rs:1239:9: warning: unneeded `return` statement
#       |
#  1239 |         return Ok(Header::new(ctb, length));
#       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
#  help: remove `return`
#       |
#  1239 -         return Ok(Header::new(ctb, length));
#  1239 +         Ok(Header::new(ctb, length))
#       |

Error: CLIPPY_WARNING: [#def24]
src/lib.rs:1398:8: warning: length comparison to zero
#       |
#  1398 |     if lints.len() > 0 {
#       |        ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lints.is_empty()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero

Error: CLIPPY_WARNING: [#def25]
src/lib.rs:1399:29: warning: useless use of `format!`
#       |
#  1399 |         let mut s: String = format!("Parsing an OpenPGP packet:");
#       |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Parsing an OpenPGP packet:".to_string()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format

Error: CLIPPY_WARNING: [#def26]
src/lib.rs:1548:41: warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
#       |
#  1548 |         for (i, c) in issuer.as_bytes().into_iter().enumerate() {
#       |                                         ^^^^^^^^^ help: call directly: `iter`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#into_iter_on_ref
#       = note: `#[warn(clippy::into_iter_on_ref)]` on by default

Error: CLIPPY_WARNING: [#def27]
src/lib.rs:1549:25: warning: casting to the same type is unnecessary (`u8` -> `u8`)
#       |
#  1549 |             buffer[i] = *c as u8;
#       |                         ^^^^^^^^ help: try: `*c`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_cast

Error: CLIPPY_WARNING: [#def28]
src/lib.rs:1556:9: warning: redundant field names in struct initialization
#       |
#  1556 |         userid: userid,
#       |         ^^^^^^^^^^^^^^ help: replace it with: `userid`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_field_names
#       = note: `#[warn(clippy::redundant_field_names)]` on by default

Error: CLIPPY_WARNING: [#def29]
src/lib.rs:1586:21: warning: returning the result of a `let` binding from a block
#       |
#  1583 | /                     let cert = CertParser::from(ppr)
#  1584 | |                         .next()
#  1585 | |                         .ok_or(Error::Fail("Not an OpenPGP certificate".into()))??;
#       | |___________________________________________________________________________________- unnecessary `let` binding
#  1586 |                       cert
#       |                       ^^^^
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#let_and_return
#       = note: `#[warn(clippy::let_and_return)]` on by default
#  help: return the expression directly
#       |
#  1583 ~                     
#  1584 ~                     CertParser::from(ppr)
#  1585 +                         .next()
#  1586 +                         .ok_or(Error::Fail("Not an OpenPGP certificate".into()))??
#       |

Error: CLIPPY_WARNING: [#def30]
src/lib.rs:1626:8: warning: length comparison to zero
#       |
#  1626 |     if keys.len() == 0 {
#       |        ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `keys.is_empty()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero

Error: CLIPPY_WARNING: [#def31]
src/lib.rs:2071:30: warning: use of `unwrap_or` to construct default value
#       |
#  2071 | ...                   .unwrap_or(Vec::new())
#       |                        ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
#       |
#       = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unwrap_or_default
#       = note: `#[warn(clippy::unwrap_or_default)]` on by default

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-86.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-namerust-rpm-sequoia-1.10.0-1.fc44
store-results-to/tmp/tmphz98ub_7/rust-rpm-sequoia-1.10.0-1.fc44.tar.xz
time-created2026-01-08 21:39:04
time-finished2026-01-08 21:43:21
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmphz98ub_7/rust-rpm-sequoia-1.10.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphz98ub_7/rust-rpm-sequoia-1.10.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9