libkscreen-6.1.1-1.fc41

List of Defects

Error: COMPILER_WARNING (CWE-477): [#def1]
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp:92:33: warning[-Wdeprecated-declarations]: ‘bool QVariant::canConvert(int) const’ is deprecated
#   92 |             if (value.canConvert(property.type())) {
#      |                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qvariant.h:353:10: note: declared here
#  353 |     bool canConvert(int targetTypeId) const
#      |          ^~~~~~~~~~
#   90|           if (property.isValid()) {
#   91|               QVariant value = iter.value();
#   92|->             if (value.canConvert(property.type())) {
#   93|                   value.convert(property.type());
#   94|                   object->setProperty(iter.key().toLatin1().constData(), value);

Error: COMPILER_WARNING (CWE-477): [#def2]
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp: scope_hint: In static member function ‘static void Parser::qvariant2qobject(const QVariantMap&, QObject*)’
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp:92:47: warning[-Wdeprecated-declarations]: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType().
#   92 |             if (value.canConvert(property.type())) {
#      |                                  ~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/QVariant:1: included_from: Included from here.
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.h:14: included_from: Included from here.
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp:7: included_from: Included from here.
/usr/include/qt6/QtCore/qvariant.h:432:10: note: declared here
#  432 |     Type type() const
#      |          ^~~~
#   90|           if (property.isValid()) {
#   91|               QVariant value = iter.value();
#   92|->             if (value.canConvert(property.type())) {
#   93|                   value.convert(property.type());
#   94|                   object->setProperty(iter.key().toLatin1().constData(), value);

Error: COMPILER_WARNING (CWE-477): [#def3]
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp:93:30: warning[-Wdeprecated-declarations]: ‘bool QVariant::convert(int)’ is deprecated
#   93 |                 value.convert(property.type());
#      |                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qvariant.h:356:10: note: declared here
#  356 |     bool convert(int targetTypeId)
#      |          ^~~~~~~
#   91|               QVariant value = iter.value();
#   92|               if (value.canConvert(property.type())) {
#   93|->                 value.convert(property.type());
#   94|                   object->setProperty(iter.key().toLatin1().constData(), value);
#   95|               } else if (QLatin1String("QVariant") == QLatin1String(property.typeName())) {

Error: COMPILER_WARNING (CWE-477): [#def4]
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/fake/parser.cpp:93:44: warning[-Wdeprecated-declarations]: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType().
#   93 |                 value.convert(property.type());
#      |                               ~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qvariant.h:432:10: note: declared here
#  432 |     Type type() const
#      |          ^~~~
#   91|               QVariant value = iter.value();
#   92|               if (value.canConvert(property.type())) {
#   93|->                 value.convert(property.type());
#   94|                   object->setProperty(iter.key().toLatin1().constData(), value);
#   95|               } else if (QLatin1String("QVariant") == QLatin1String(property.typeName())) {

Error: COMPILER_WARNING: [#def5]
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevice.cpp: scope_hint: In member function ‘virtual void KScreen::WaylandOutputDevice::kde_output_device_v2_current_mode(kde_output_device_mode_v2*)’
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevice.cpp:58:16: warning: C++20 says that these are ambiguous, even though the second is reversed:
#   58 |     if (*m == *m_mode) {
#      |                ^~~~~~
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevice.h:9: included_from: Included from here.
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevice.cpp:7: included_from: Included from here.
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevicemode.h:28:10: note: candidate 1: ‘bool KScreen::WaylandOutputDeviceMode::operator==(const KScreen::WaylandOutputDeviceMode&)’
#   28 |     bool operator==(const WaylandOutputDeviceMode &other);
#      |          ^~~~~~~~
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevicemode.h:28:10: note: candidate 2: ‘bool KScreen::WaylandOutputDeviceMode::operator==(const KScreen::WaylandOutputDeviceMode&)’ (reversed)
libkscreen-6.1.1-build/libkscreen-6.1.1/backends/kwayland/waylandoutputdevicemode.h:28:10: note: try making the operator a ‘const’ member function
#   56|       auto m = WaylandOutputDeviceMode::get(mode);
#   57|   
#   58|->     if (*m == *m_mode) {
#   59|           // unchanged
#   60|           return;

Error: CLANG_WARNING: [#def6]
libkscreen-6.1.1-build/libkscreen-6.1.1/src/backendmanager.cpp:333:5: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  331|       });
#  332|       // And listen for its change.
#  333|->     connect(mInterface, &org::kde::kscreen::Backend::configChanged, [&](const QVariantMap &newConfig) {
#  334|           mConfig = KScreen::ConfigSerializer::deserializeConfig(newConfig);
#  335|       });

Error: COMPILER_WARNING (CWE-457): [#def7]
libkscreen-6.1.1-build/libkscreen-6.1.1/src/libdpms/waylanddpmshelper.cpp: scope_hint: In member function ‘org_kde_kwin_dpms_done’
libkscreen-6.1.1-build/libkscreen-6.1.1/src/libdpms/waylanddpmshelper.cpp:53:29: warning[-Wmaybe-uninitialized]: ‘mode’ may be used uninitialized
#   53 |         KScreen::Dpms::Mode mode;
#      |                             ^
#   51|       {
#   52|           m_supported = m_pendingSupported;
#   53|->         KScreen::Dpms::Mode mode;
#   54|           switch (m_mode) {
#   55|           case Dpms::mode_On:

Error: COMPILER_WARNING (CWE-457): [#def8]
libkscreen-6.1.1-build/libkscreen-6.1.1/src/libdpms/waylanddpmshelper.cpp: scope_hint: In member function ‘Dpms::org_kde_kwin_dpms_done()’
libkscreen-6.1.1-build/libkscreen-6.1.1/src/libdpms/waylanddpmshelper.cpp:69:39: warning[-Wmaybe-uninitialized]: ‘mode’ may be used uninitialized
#   69 |             Q_EMIT m_dpms->modeChanged(mode, m_screen);
#      |                    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
libkscreen-6.1.1-build/libkscreen-6.1.1/src/libdpms/waylanddpmshelper.cpp:53:29: note: ‘mode’ was declared here
#   53 |         KScreen::Dpms::Mode mode;
#      |                             ^~~~
#   67|           }
#   68|           if (m_dpms) {
#   69|->             Q_EMIT m_dpms->modeChanged(mode, m_screen);
#   70|           }
#   71|       }

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-64.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibkscreen-6.1.1-1.fc41
store-results-to/tmp/tmp9uivacdb/libkscreen-6.1.1-1.fc41.tar.xz
time-created2024-07-03 14:50:01
time-finished2024-07-03 14:52:47
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9uivacdb/libkscreen-6.1.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp9uivacdb/libkscreen-6.1.1-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9