plasma-discover-6.1.1-1.fc41

List of Defects

Error: COMPILER_WARNING (CWE-563): [#def1]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp: scope_hint: In member function ‘FlatpakRemote* FlatpakBackend::installSource(FlatpakResource*)’
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1975:14: warning[-Wunused-variable]: unused variable ‘remote’
# 1975 |     if (auto remote = flatpak_installation_get_remote_by_name(preferredInstallation(), resource->flatpakName().toUtf8().constData(), cancellable, nullptr)) {
#      |              ^~~~~~
# 1973|       g_autoptr(GCancellable) cancellable = g_cancellable_new();
# 1974|   
# 1975|->     if (auto remote = flatpak_installation_get_remote_by_name(preferredInstallation(), resource->flatpakName().toUtf8().constData(), cancellable, nullptr)) {
# 1976|           qCWarning(LIBDISCOVER_BACKEND_FLATPAK_LOG) << "Source" << resource->flatpakName() << "already exists in"
# 1977|                                                      << flatpak_installation_get_path(preferredInstallation());

Error: COMPILER_WARNING (CWE-563): [#def2]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp: scope_hint: In member function ‘bool FlatpakTransactionThread::end_of_lifed_with_rebase(const char*, const char*, const char*, const char*, const char**)’
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp:392:69: warning[-Wunused-parameter]: unused parameter ‘reason’
#  392 |                                                         const char *reason,
#      |                                                         ~~~~~~~~~~~~^~~~~~
#  390|   bool FlatpakTransactionThread::end_of_lifed_with_rebase(const char *remote,
#  391|                                                           const char *ref,
#  392|->                                                         const char *reason,
#  393|                                                           const char *rebased_to_ref,
#  394|                                                           const char **previous_ids)

Error: CLANG_WARNING: [#def3]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/KNSBackend/KNSBackend.cpp:304:1: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  302|       filter.state = AbstractResource::Upgradeable;
#  303|       search(filter);
#  304|-> }
#  305|   
#  306|   void KNSBackend::setFetching(bool f)

Error: COMPILER_WARNING (CWE-477): [#def4]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/SnapResource.cpp: scope_hint: In constructor ‘PlugsModel::PlugsModel(SnapResource*, SnapBackend*, QObject*)’
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/SnapResource.cpp:369:62: warning[-Wdeprecated-declarations]: ‘int QSnapdPlug::connectionCount() const’ is deprecated: Use connectedSlotCount()
#  369 |                     item->setCheckState(plug->connectionCount() > 0 ? Qt::Checked : Qt::Unchecked);
#      |                                         ~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/snapd-qt-2/Snapd/Plug:1: included_from: Included from here.
/usr/include/snapd-qt-2/Snapd/interface.h:15: included_from: Included from here.
/usr/include/snapd-qt-2/Snapd/Interface:1: included_from: Included from here.
/usr/include/snapd-qt-2/Snapd/client.h:22: included_from: Included from here.
/usr/include/snapd-qt-2/Snapd/Client:1: included_from: Included from here.
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/SnapBackend.h:12: included_from: Included from here.
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/SnapResource.cpp:8: included_from: Included from here.
/usr/include/snapd-qt-2/Snapd/plug.h:39:57: note: declared here
#   39 |     Q_DECL_DEPRECATED_X("Use connectedSlotCount()") int connectionCount () const;
#      |                                                         ^~~~~~~~~~~~~~~
#  367|                       // slot->snap() << slot->interface() << slot->label();
#  368|                       item->setCheckable(true);
#  369|->                     item->setCheckState(plug->connectionCount() > 0 ? Qt::Checked : Qt::Unchecked);
#  370|                       item->setData(plug->name(), PlugNameRole);
#  371|                       item->setData(slot->snap(), SlotSnapRole);

Error: CLANG_WARNING: [#def5]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/SnapResource.cpp:407:16: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  405|               Q_EMIT error(new InlineMessage(InlineMessage::Error, u"error"_s, req->errorString()));
#  406|           }
#  407|->         return req->error() == QSnapdRequest::NoError;
#  408|       }
#  409|   

Error: CLANG_WARNING: [#def6]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/backends/SnapBackend/libsnapclient/SnapAuthHelper.cpp:66:1: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#   64|   };
#   65|   
#   66|-> KAUTH_HELPER_MAIN("org.kde.discover.libsnapclient", SnapAuthHelper)
#   67|   
#   68|   #include "SnapAuthHelper.moc"

Error: CLANG_WARNING: [#def7]
plasma-discover-6.1.1-build/discover-6.1.1/libdiscover/resources/ResourcesModel.cpp:74:26: warning[core.DivideZero]: Division by zero
#   72|                     weights += backend->fetchingUpdatesProgressWeight();
#   73|                 }
#   74|->               return sum / weights;
#   75|             },
#   76|             [this](int progress) {

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-188.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameplasma-discover-6.1.1-1.fc41
store-results-to/tmp/tmp56xq_jux/plasma-discover-6.1.1-1.fc41.tar.xz
time-created2024-07-03 17:05:00
time-finished2024-07-03 17:10:03
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp56xq_jux/plasma-discover-6.1.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp56xq_jux/plasma-discover-6.1.1-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9