plasma-desktop-6.0.3-1.fc40

List of Defects

Error: CPPCHECK_WARNING: [#def1]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/ibus/ibus15/gtkaccelparse_p.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/ibus/ibus15/panel.cpp:475:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'engine_names'
#  473|       g_strfreev(engine_names);
#  474|   
#  475|->     impanel->app->setDoGrab(len > 1);
#  476|   }
#  477|   

Error: CLANG_WARNING: [#def3]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/ibus/ibus15/panel.cpp:519:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'triggers'
#  517|           }
#  518|       }
#  519|->     impanel->app->setTriggerKeys(triggersList);
#  520|   }
#  521|   

Error: CLANG_WARNING: [#def4]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/ibus/ibus15/panel.cpp:1369:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'engine_names'
# 1367|       g_settings_set_value(impanel->settings_general, "engines-order", var);
# 1368|       g_strfreev(engine_names);
# 1369|->     g_object_unref(engine_desc);
# 1370|   }
# 1371|   

Error: COMPILER_WARNING: [#def5]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/scim/main.cpp: scope_hint: In function ‘int main(int, char**)’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/scim/main.cpp:1112:26: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
# 1112 |     new_argv[new_argc] = 0;
#      |                          ^
# 1110|       }
# 1111|   
# 1112|->     new_argv[new_argc] = 0;
# 1113|   
# 1114|       if (!config_name.length()) {

Error: CLANG_WARNING: [#def6]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/kimpanel/backend/scim/main.cpp:1114:10: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'new_argv'
# 1112|       new_argv[new_argc] = 0;
# 1113|   
# 1114|->     if (!config_name.length()) {
# 1115|           std::cerr << "No Config module is available!\n";
# 1116|           return -1;

Error: CLANG_WARNING: [#def7]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/applets/taskmanager/plugin/backend.cpp:298:13: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'placeAction'
#  296|               subMenu->addAction(placeAction);
#  297|           } else {
#  298|->             actions << QVariant::fromValue(placeAction);
#  299|           }
#  300|       }

Error: COMPILER_WARNING (CWE-477): [#def8]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/containments/desktop/plugins/folder/eventgenerator.cpp: scope_hint: In member function ‘void EventGenerator::sendMouseEvent(QQuickItem*, MouseEvent, int, int, int, Qt::MouseButtons, Qt::KeyboardModifiers)’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/containments/desktop/plugins/folder/eventgenerator.cpp:49:102: warning[-Wdeprecated-declarations]: ‘QMouseEvent::QMouseEvent(QEvent::Type, const QPointF&, Qt::MouseButton, Qt::MouseButtons, Qt::KeyboardModifiers, const QPointingDevice*)’ is deprecated: Use another constructor
#   49 |     QMouseEvent ev(eventType, QPointF(x, y), static_cast<Qt::MouseButton>(button), buttons, modifiers);
#      |                                                                                                      ^
/usr/include/qt6/QtQuick/qquickitem.h:14: included_from: Included from here.
/usr/include/qt6/QtQuick/QQuickItem:1: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/containments/desktop/plugins/folder/eventgenerator.cpp:11: included_from: Included from here.
/usr/include/qt6/QtGui/qevent.h:200:5: note: declared here
#  200 |     QMouseEvent(Type type, const QPointF &localPos, Qt::MouseButton button,
#      |     ^~~~~~~~~~~
#   47|           return;
#   48|       }
#   49|->     QMouseEvent ev(eventType, QPointF(x, y), static_cast<Qt::MouseButton>(button), buttons, modifiers);
#   50|   
#   51|       QGuiApplication::sendEvent(item, &ev);

Error: COMPILER_WARNING (CWE-569): [#def9]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/containments/desktop/plugins/folder/shortcut.cpp: scope_hint: In member function ‘virtual bool ShortCut::eventFilter(QObject*, QEvent*)’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/containments/desktop/plugins/folder/shortcut.cpp:30:50: warning[-Wparentheses]: suggest parentheses around arithmetic in operand of ‘|’
#   30 |         const int keyInt = keyEvent->modifiers() & ~Qt::KeypadModifier | keyEvent->key();
#      |                            ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
#   28|       if (e->type() == QEvent::KeyPress) {
#   29|           QKeyEvent *keyEvent = static_cast<QKeyEvent *>(e);
#   30|->         const int keyInt = keyEvent->modifiers() & ~Qt::KeypadModifier | keyEvent->key();
#   31|           if (KStandardShortcut::deleteFile().contains(QKeySequence(keyInt))) {
#   32|               Q_EMIT deleteFile();

Error: COMPILER_WARNING (CWE-477): [#def10]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/imports/activitymanager/switcherbackend.cpp: scope_hint: In function ‘bool {anonymous}::areModifiersPressed(const QKeySequence&)’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/imports/activitymanager/switcherbackend.cpp:47:42: warning[-Wdeprecated-declarations]: ‘constexpr QKeyCombination::operator int() const’ is deprecated: Use QKeyCombination instead of int
#   47 |     int mod = seq[seq.count() - 1] & Qt::KeyboardModifierMask;
#      |                                          ^~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qbytearray.h:9: included_from: Included from here.
/usr/include/qt6/QtCore/qstringview.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/qchar.h:656: included_from: Included from here.
/usr/include/qt6/QtCore/qstring.h:14: included_from: Included from here.
/usr/include/qt6/QtCore/qhashfunctions.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/qhash.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/qabstractitemmodel.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/QAbstractItemModel:1: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/imports/activitymanager/switcherbackend.h:10: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/imports/activitymanager/switcherbackend.cpp:11: included_from: Included from here.
/usr/include/qt6/QtCore/qnamespace.h:1902:26: note: declared here
# 1902 |     constexpr Q_IMPLICIT operator int() const noexcept
#      |                          ^~~~~~~~
#   45|           return false;
#   46|       }
#   47|->     int mod = seq[seq.count() - 1] & Qt::KeyboardModifierMask;
#   48|       auto activeMods = qGuiApp->queryKeyboardModifiers();
#   49|       return activeMods & mod;

Error: COMPILER_WARNING: [#def11]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kaccess/kaccess.cpp:494:2: warning: #warning before C++23 is a GCC extension
#  494 | #warning is this the best way to invert a pixmap?
#      |  ^~~~~~~
#  492|   
#  493|   #ifdef __GNUC__
#  494|-> #warning is this the best way to invert a pixmap?
#  495|   #endif
#  496|               //    QPixmap invert(window.size.width, window.size.height);

Error: COMPILER_WARNING: [#def12]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kaccess/kaccess.cpp:494:2: warning[-Wcpp]: #warning is this the best way to invert a pixmap?
#  492|   
#  493|   #ifdef __GNUC__
#  494|-> #warning is this the best way to invert a pixmap?
#  495|   #endif
#  496|               //    QPixmap invert(window.size.width, window.size.height);

Error: COMPILER_WARNING: [#def13]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/dateandtime/dtime.cpp: scope_hint: In member function ‘void Dtime::findNTPutility()’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/dateandtime/dtime.cpp:148:25: warning[-Wrange-loop-construct]: loop variable ‘possible_ntputility’ of type ‘const QString&’ binds to a temporary constructed from type ‘const char* const’
#  148 |     for (const QString &possible_ntputility : possible_ntputilities) {
#      |                         ^~~~~~~~~~~~~~~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/dateandtime/dtime.cpp:148:25: note: use non-reference type ‘const QString’ to make the copy explicit or ‘const char* const&’ to prevent copying
#  146|   
#  147|       const auto possible_ntputilities = {"ntpdate", "rdate"};
#  148|->     for (const QString &possible_ntputility : possible_ntputilities) {
#  149|           ntpUtility = QStandardPaths::findExecutable(possible_ntputility, path);
#  150|           if (!ntpUtility.isEmpty()) {

Error: CLANG_WARNING: [#def14]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/dateandtime/helper.cpp:229:1: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  227|   }
#  228|   
#  229|-> KAUTH_HELPER_MAIN("org.kde.kcontrol.kcmclock", ClockHelper)

Error: COMPILER_WARNING (CWE-1164): [#def15]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/dateandtime/k4timezonewidget.cpp:53:13: warning[-Wunused-function]: ‘bool localeLessThan(const QString&, const QString&)’ defined but not used
#   53 | static bool localeLessThan(const QString &a, const QString &b)
#      |             ^~~~~~~~~~~~~~
#   51|   };
#   52|   
#   53|-> static bool localeLessThan(const QString &a, const QString &b)
#   54|   {
#   55|       return QString::localeAwareCompare(a, b) < 0;

Error: CLANG_WARNING: [#def16]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/kded/kcmkded.cpp:179:1: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'callWatcher'
#  177|           m_runningModulesBeforeReconfigure.clear();
#  178|       });
#  179|-> }
#  180|   
#  181|   void KDEDConfig::load()

Error: CLANG_WARNING: [#def17]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/keys/kcm_keys.cpp:334:5: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  332|                                      nullptr,
#  333|                                      KMessageBox::NoExec);
#  334|->     dialog->show();
#  335|   
#  336|       connect(dialog, &QDialog::finished, this, [index, conflict, newSequence, oldSequence](int result) {

Error: CLANG_WARNING: [#def18]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/keys/keysdata.cpp:47:40: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'shortcutsWatcher'
#   45|           }
#   46|           const auto components = componentsReply.value();
#   47|->         for (const auto &componentPath : components) {
#   48|               KGlobalAccelComponentInterface component(QStringLiteral("org.kde.kglobalaccel"), componentPath.path(), QDBusConnection::sessionBus());
#   49|               ++m_pendingComponentCalls;

Error: CLANG_WARNING: [#def19]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/keys/shortcutsmodel.cpp:395:31: warning[deadcode.DeadStores]: Value stored to 'sourceModel' during its initialization is never read
#  393|   void ShortcutsModelPrivate::slotModelAboutToBeReset()
#  394|   {
#  395|->     const QAbstractItemModel *sourceModel = qobject_cast<const QAbstractItemModel *>(q->sender());
#  396|       Q_ASSERT(m_models.contains(const_cast<QAbstractItemModel *>(sourceModel)));
#  397|       q->beginResetModel();

Error: COMPILER_WARNING: [#def20]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/mouse/inputbackend.h:59:18: warning[-Woverloaded-virtual=]: ‘virtual bool InputBackend::applyConfig(const QVariantHash&)’ was hidden
#   59 |     virtual bool applyConfig(const QVariantHash &)
#      |                  ^~~~~~~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/mouse/backends/kwin_wl/kwin_wl_backend.h:26:10: note:   by ‘virtual bool KWinWaylandBackend::applyConfig()’
#   26 |     bool applyConfig() override;
#      |          ^~~~~~~~~~~
#   57|       }
#   58|   
#   59|->     virtual bool applyConfig(const QVariantHash &)
#   60|       {
#   61|           return false;

Error: COMPILER_WARNING: [#def21]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/mouse/backends/kwin_wl/kwin_wl_backend.h:9: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/redhat-linux-build/kcms/mouse/kapplymousetheme_autogen/XQKYUBJNE2/moc_kwin_wl_backend.cpp:9: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/redhat-linux-build/kcms/mouse/kapplymousetheme_autogen/mocs_compilation.cpp:2: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/mouse/inputbackend.h:63:18: warning[-Woverloaded-virtual=]: ‘virtual bool InputBackend::getConfig(QVariantHash&)’ was hidden
#   63 |     virtual bool getConfig(QVariantHash &)
#      |                  ^~~~~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/mouse/backends/kwin_wl/kwin_wl_backend.h:27:10: note:   by ‘virtual bool KWinWaylandBackend::getConfig()’
#   27 |     bool getConfig() override;
#      |          ^~~~~~~~~
#   61|           return false;
#   62|       }
#   63|->     virtual bool getConfig(QVariantHash &)
#   64|       {
#   65|           return false;

Error: COMPILER_WARNING (CWE-477): [#def22]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/recentFiles/BlacklistedApplicationsModel.cpp: scope_hint: In member function ‘void BlacklistedApplicationsModel::load()’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/recentFiles/BlacklistedApplicationsModel.cpp:84:31: warning[-Wdeprecated-declarations]: ‘QSqlQuery QSqlDatabase::exec(const QString&) const’ is deprecated: Use QSqlQuery::exec() instead.
#   84 |     auto query = database.exec(QStringLiteral("SELECT DISTINCT(initiatingAgent) FROM ResourceScoreCache ORDER BY initiatingAgent"));
#      |                  ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtSql/QSqlDatabase:1: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/recentFiles/BlacklistedApplicationsModel.cpp:13: included_from: Included from here.
/usr/include/qt6/QtSql/qsqldatabase.h:53:15: note: declared here
#   53 |     QSqlQuery exec(const QString& query = QString()) const;
#      |               ^~~~
#   82|       }
#   83|   
#   84|->     auto query = database.exec(QStringLiteral("SELECT DISTINCT(initiatingAgent) FROM ResourceScoreCache ORDER BY initiatingAgent"));
#   85|   
#   86|       if (d->applications.length() > 0) {

Error: COMPILER_WARNING: [#def23]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/solid_actions/ActionEditor.cpp: scope_hint: In member function ‘void ActionEditor::manageControlStatus()’
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/solid_actions/ActionEditor.cpp:130:20: warning[-Wimplicit-fallthrough=]: this statement may fall through
#  130 |         atomEnable = true;
#      |         ~~~~~~~~~~~^~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/solid_actions/ActionEditor.cpp:131:5: note: here
#  131 |     case Solid::Predicate::InterfaceCheck:
#      |     ^~~~
#  128|       switch (ui.CbParameterType->currentIndex()) {
#  129|       case Solid::Predicate::PropertyCheck:
#  130|->         atomEnable = true;
#  131|       case Solid::Predicate::InterfaceCheck:
#  132|           isEnable = true;

Error: CLANG_WARNING: [#def24]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/solid_actions/PredicateItem.cpp:47:18: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'child'
#   45|           PredicateItem *child2 = new PredicateItem(item.secondOperand(), this);
#   46|           Q_UNUSED(child)
#   47|->         Q_UNUSED(child2)
#   48|       }
#   49|       // We're now ready, no need to keep the Solid::Predicate for now

Error: CLANG_WARNING: [#def25]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/solid_actions/PredicateItem.cpp:50:1: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'child2'
#   48|       }
#   49|       // We're now ready, no need to keep the Solid::Predicate for now
#   50|-> }
#   51|   
#   52|   PredicateItem::~PredicateItem()

Error: CLANG_WARNING: [#def26]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/kded/kded.cpp:73:5: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'callWatcher'
#   71|       connect(callWatcher, SIGNAL(finished(QDBusPendingCallWatcher *)), this, SLOT(serviceNameFetchFinished(QDBusPendingCallWatcher *)));
#   72|   
#   73|->     QDBusConnection::systemBus().connect(QStringLiteral("org.freedesktop.login1"),
#   74|                                            QStringLiteral("/org/freedesktop/login1"),
#   75|                                            QStringLiteral("org.freedesktop.login1.Manager"),

Error: CLANG_WARNING: [#def27]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/kded/kded.cpp:245:5: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'actions'
#  243|       });
#  244|   
#  245|->     updateCurrentState();
#  246|       mousePlugged();
#  247|   }

Error: COMPILER_WARNING: [#def28]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/touchpadbackend.h:48:18: warning[-Woverloaded-virtual=]: ‘virtual bool TouchpadBackend::applyConfig(const QVariantHash&)’ was hidden
#   48 |     virtual bool applyConfig(const QVariantHash &)
#      |                  ^~~~~~~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/backends/kwin_wayland/kwinwaylandbackend.h:25:10: note:   by ‘virtual bool KWinWaylandBackend::applyConfig()’
#   25 |     bool applyConfig() override;
#      |          ^~~~~~~~~~~
#   46|       }
#   47|   
#   48|->     virtual bool applyConfig(const QVariantHash &)
#   49|       {
#   50|           return false;

Error: COMPILER_WARNING: [#def29]
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/backends/kwin_wayland/kwinwaylandbackend.h:9: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/redhat-linux-build/kcms/touchpad/touchpad_autogen/3MWDB76QXP/moc_kwinwaylandbackend.cpp:9: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/redhat-linux-build/kcms/touchpad/touchpad_autogen/mocs_compilation.cpp:3: included_from: Included from here.
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/touchpadbackend.h:52:18: warning[-Woverloaded-virtual=]: ‘virtual bool TouchpadBackend::getConfig(QVariantHash&)’ was hidden
#   52 |     virtual bool getConfig(QVariantHash &)
#      |                  ^~~~~~~~~
plasma-desktop-6.0.3-build/plasma-desktop-6.0.3/kcms/touchpad/backends/kwin_wayland/kwinwaylandbackend.h:26:10: note:   by ‘virtual bool KWinWaylandBackend::getConfig()’
#   26 |     bool getConfig() override;
#      |          ^~~~~~~~~
#   50|           return false;
#   51|       }
#   52|->     virtual bool getConfig(QVariantHash &)
#   53|       {
#   54|           return false;

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-34.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameplasma-desktop-6.0.3-1.fc40
store-results-to/tmp/tmp1tcw8hl7/plasma-desktop-6.0.3-1.fc40.tar.xz
time-created2024-07-03 16:55:44
time-finished2024-07-03 17:08:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp1tcw8hl7/plasma-desktop-6.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp1tcw8hl7/plasma-desktop-6.0.3-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9