librsvg2-2.60.0-1.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
librsvg-2.60.0/librsvg-c/tests-c/api.c:1728: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
# 1726|           size_t num_read;
# 1727|   
# 1728|->         num_read = fread (buf, 1, fixture_data->buf_size, file);
# 1729|   
# 1730|           if (num_read > 0) {

Error: CPPCHECK_WARNING (CWE-476): [#def2]
librsvg-2.60.0/librsvg-c/tests-c/api.c:1741: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
# 1739|       } while (!done);
# 1740|   
# 1741|->     fclose (file);
# 1742|       g_free (filename);
# 1743|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1728:20: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(g_build_filename(test_utils_get_test_data_path(), *(const LoadingTestData *)data.fixture, 0), "rb")’ where non-null expected
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1718:12: acquire_memory: allocated here
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1719:5: release_memory: assuming ‘fopen(g_build_filename(test_utils_get_test_data_path(), *(const LoadingTestData *)data.fixture, 0), "rb")’ is NULL
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1719:5: branch_false: following ‘false’ branch...
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1719:5: branch_false: ...to here
librsvg-2.60.0/redhat-linux-build/../librsvg-c/tests-c/api.c:1728:20: danger: argument 4 (‘fopen(g_build_filename(test_utils_get_test_data_path(), *(const LoadingTestData *)data.fixture, 0), "rb")’) NULL where non-null expected
# 1726|           size_t num_read;
# 1727|   
# 1728|->         num_read = fread (buf, 1, fixture_data->buf_size, file);
# 1729|   
# 1730|           if (num_read > 0) {

Error: CLIPPY_WARNING: [#def4]
librsvg-c/src/sizing.rs:40:6: warning: the following explicit lifetimes could be elided: 'a
#     |
#  40 | impl<'a> LegacySize for CairoRenderer<'a> {
#     |      ^^                               ^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#     = note: `#[warn(clippy::needless_lifetimes)]` on by default
#  help: elide the lifetimes
#     |
#  40 - impl<'a> LegacySize for CairoRenderer<'a> {
#  40 + impl LegacySize for CairoRenderer<'_> {
#     |

Error: CLIPPY_WARNING: [#def5]
rsvg/src/css.rs:158:6: warning: the following explicit lifetimes could be elided: 'i
#      |
#  158 | impl<'i> AtRuleParser<'i> for DeclParser {
#      |      ^^               ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#      = note: `#[warn(clippy::needless_lifetimes)]` on by default
#  help: elide the lifetimes
#      |
#  158 - impl<'i> AtRuleParser<'i> for DeclParser {
#  158 + impl AtRuleParser<'_> for DeclParser {
#      |

Error: CLIPPY_WARNING: [#def6]
rsvg/src/css.rs:165:6: warning: the following explicit lifetimes could be elided: 'i
#      |
#  165 | impl<'i> QualifiedRuleParser<'i> for DeclParser {
#      |      ^^                      ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  165 - impl<'i> QualifiedRuleParser<'i> for DeclParser {
#  165 + impl QualifiedRuleParser<'_> for DeclParser {
#      |

Error: CLIPPY_WARNING: [#def7]
rsvg/src/css.rs:171:6: warning: the following explicit lifetimes could be elided: 'i
#      |
#  171 | impl<'i> RuleBodyItemParser<'i, RuleBodyItem, ValueErrorKind> for DeclParser {
#      |      ^^                     ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  171 - impl<'i> RuleBodyItemParser<'i, RuleBodyItem, ValueErrorKind> for DeclParser {
#  171 + impl RuleBodyItemParser<'_, RuleBodyItem, ValueErrorKind> for DeclParser {
#      |

Error: CLIPPY_WARNING: [#def8]
rsvg/src/css.rs:694:49: warning: this `map_or` can be simplified
#      |
#  694 |               NonTSPseudoClass::Lang(css_lang) => self
#      |  _________________________________________________^
#  695 | |                 .0
#  696 | |                 .borrow_element()
#  697 | |                 .get_computed_values()
#  ...   |
#  704 | |                         .any(|l| l.is_language_range() && l.matches(e_lang))
#  705 | |                 }),
#      | |__________________^
#      |
#      = 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
#      |
#  701 -                 .map_or(false, |e_lang| {
#  701 +                 .is_some_and(|e_lang| {
#      |

Error: CLIPPY_WARNING: [#def9]
rsvg/src/css.rs:837:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  837 | impl<'a> Ord for Match<'a> {
#      |      ^^                ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  837 - impl<'a> Ord for Match<'a> {
#  837 + impl Ord for Match<'_> {
#      |

Error: CLIPPY_WARNING: [#def10]
rsvg/src/css.rs:846:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  846 | impl<'a> PartialOrd for Match<'a> {
#      |      ^^                       ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  846 - impl<'a> PartialOrd for Match<'a> {
#  846 + impl PartialOrd for Match<'_> {
#      |

Error: CLIPPY_WARNING: [#def11]
rsvg/src/css.rs:852:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  852 | impl<'a> PartialEq for Match<'a> {
#      |      ^^                      ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  852 - impl<'a> PartialEq for Match<'a> {
#  852 + impl PartialEq for Match<'_> {
#      |

Error: CLIPPY_WARNING: [#def12]
rsvg/src/css.rs:858:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  858 | impl<'a> Eq for Match<'a> {}
#      |      ^^               ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  858 - impl<'a> Eq for Match<'a> {}
#  858 + impl Eq for Match<'_> {}
#      |

Error: CLIPPY_WARNING: [#def13]
rsvg/src/document.rs:751:6: warning: the following explicit lifetimes could be elided: 'i
#      |
#  751 | impl<'i> AcquiredNodes<'i> {
#      |      ^^                ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  751 - impl<'i> AcquiredNodes<'i> {
#  751 + impl AcquiredNodes<'_> {
#      |

Error: CLIPPY_WARNING: [#def14]
rsvg/src/error.rs:63:6: warning: the following explicit lifetimes could be elided: 'a
#     |
#  63 | impl<'a> From<BasicParseError<'a>> for ValueErrorKind {
#     |      ^^                       ^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#     |
#  63 - impl<'a> From<BasicParseError<'a>> for ValueErrorKind {
#  63 + impl From<BasicParseError<'_>> for ValueErrorKind {
#     |

Error: CLIPPY_WARNING: [#def15]
rsvg/src/error.rs:288:6: warning: the following explicit lifetimes could be elided: 'i
#      |
#  288 | impl<'i, O> AttributeResultExt<O> for Result<O, ParseError<'i>> {
#      |      ^^                                                    ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  288 - impl<'i, O> AttributeResultExt<O> for Result<O, ParseError<'i>> {
#  288 + impl<O> AttributeResultExt<O> for Result<O, ParseError<'_>> {
#      |

Error: CLIPPY_WARNING: [#def16]
rsvg/src/filter_func.rs:671:9: warning: unneeded `return` statement
#      |
#  671 |         return Err(loc.new_custom_error(ValueErrorKind::parse_error("expected filter function")));
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#      = note: `#[warn(clippy::needless_return)]` on by default
#  help: remove `return`
#      |
#  671 -         return Err(loc.new_custom_error(ValueErrorKind::parse_error("expected filter function")));
#  671 +         Err(loc.new_custom_error(ValueErrorKind::parse_error("expected filter function")))
#      |

Error: CLIPPY_WARNING: [#def17]
rsvg/src/font_props.rs:505:20: warning: comparison to empty slice
#      |
#  505 |                 if cow == "" {
#      |                    ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `cow.is_empty()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
#      = note: `#[warn(clippy::comparison_to_empty)]` on by default

Error: CLIPPY_WARNING: [#def18]
rsvg/src/path_builder.rs:591:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  591 | impl<'a> SubPath<'a> {
#      |      ^^          ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  591 - impl<'a> SubPath<'a> {
#  591 + impl SubPath<'_> {
#      |

Error: CLIPPY_WARNING: [#def19]
rsvg/src/path_builder.rs:691:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  691 | impl<'a> Iterator for SubPathCommandsIter<'a> {
#      |      ^^                                   ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  691 - impl<'a> Iterator for SubPathCommandsIter<'a> {
#  691 + impl Iterator for SubPathCommandsIter<'_> {
#      |

Error: CLIPPY_WARNING: [#def20]
rsvg/src/surface_utils/iterators.rs:106:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  106 | impl<'a> Iterator for Pixels<'a> {
#      |      ^^                      ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  106 - impl<'a> Iterator for Pixels<'a> {
#  106 + impl Iterator for Pixels<'_> {
#      |

Error: CLIPPY_WARNING: [#def21]
rsvg/src/surface_utils/iterators.rs:135:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  135 | impl<'a> Iterator for PixelRectangle<'a> {
#      |      ^^                              ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  135 - impl<'a> Iterator for PixelRectangle<'a> {
#  135 + impl Iterator for PixelRectangle<'_> {
#      |

Error: CLIPPY_WARNING: [#def22]
rsvg/src/surface_utils/mod.rs:184:5: warning: empty line after doc comment
#      |
#  184 | /     /// if pixel = 0x00020202, pixel' = 0x02......
#  185 | |
#      | |_^
#  ...
#  188 |       fn to_luminance_mask(&self) -> Self {
#      |       -------------------- 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 line is unintentional, remove it
#  help: if the documentation should include the empty line include it in the comment
#      |
#  185 |     ///
#      |

Error: CLIPPY_WARNING: [#def23]
rsvg/src/surface_utils/mod.rs:222:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  222 | impl<'a> ImageSurfaceDataExt for cairo::ImageSurfaceData<'a> {
#      |      ^^                                                  ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  222 - impl<'a> ImageSurfaceDataExt for cairo::ImageSurfaceData<'a> {
#  222 + impl ImageSurfaceDataExt for cairo::ImageSurfaceData<'_> {
#      |

Error: CLIPPY_WARNING: [#def24]
rsvg/src/surface_utils/shared_surface.rs:685:25: warning: the following explicit lifetimes could be elided: 'a
#      |
#  685 |             unsafe impl<'a> Send for UnsafeSendPixelData<'a> {}
#      |                         ^^                               ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  685 -             unsafe impl<'a> Send for UnsafeSendPixelData<'a> {}
#  685 +             unsafe impl Send for UnsafeSendPixelData<'_> {}
#      |

Error: CLIPPY_WARNING: [#def25]
rsvg/src/surface_utils/shared_surface.rs:687:18: warning: the following explicit lifetimes could be elided: 'a
#      |
#  687 |             impl<'a> UnsafeSendPixelData<'a> {
#      |                  ^^                      ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  687 -             impl<'a> UnsafeSendPixelData<'a> {
#  687 +             impl UnsafeSendPixelData<'_> {
#      |

Error: CLIPPY_WARNING: [#def26]
rsvg/src/url_resolver.rs:91:18: warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
#     |
#  91 |                 .last()
#     |                  ^^^^^^ help: try: `next_back()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
#     = note: `#[warn(clippy::double_ended_iterator_last)]` on by default

Error: CLIPPY_WARNING: [#def27]
rsvg/src/xml/mod.rs:723:9: warning: variable does not need to be mutable
#      |
#  723 |     let mut tokenizer = XmlTokenizer::new(sink, XmlTokenizerOpts::default());
#      |         ----^^^^^^^^^
#      |         |
#      |         help: remove this `mut`
#      |
#  note: the lint level is defined here
#     --> rsvg/src/lib.rs:140:46
#      |
#  140 | #![warn(nonstandard_style, rust_2018_idioms, unused)]
#      |                                              ^^^^^^
#      = note: `#[warn(unused_mut)]` implied by `#[warn(unused)]`

Error: CLIPPY_WARNING: [#def28]
rsvg/src/xml/mod.rs:724:19: warning: the method `run` doesn't need a mutable reference
#      |
#  724 |     tokenizer.run(&mut queue);
#      |                   ^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
#      = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default

Error: CLIPPY_WARNING: [#def29]
rsvg/src/xml/xml2_load.rs:485:6: warning: the following explicit lifetimes could be elided: 'a
#      |
#  485 | impl<'a> Drop for Xml2Parser<'a> {
#      |      ^^                      ^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
#  help: elide the lifetimes
#      |
#  485 - impl<'a> Drop for Xml2Parser<'a> {
#  485 + impl Drop for Xml2Parser<'_> {
#      |

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-8.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibrsvg2-2.60.0-1.fc43
store-results-to/tmp/tmpq3mdl42s/librsvg2-2.60.0-1.fc43.tar.xz
time-created2025-04-25 14:13:31
time-finished2025-04-25 14:20:45
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpq3mdl42s/librsvg2-2.60.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpq3mdl42s/librsvg2-2.60.0-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9