plasma-discover-6.0.3-1.fc40

List of Defects

Error: CLANG_WARNING: [#def1]
plasma-discover-6.0.3-build/discover-6.0.3/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: CLANG_WARNING: [#def2]
plasma-discover-6.0.3-build/discover-6.0.3/libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp:824:23: warning[core.CallAndMessage]: Called C++ object pointer is null
#  822|               upgrade->fetchChangelog();
#  823|           } else {
#  824|->             pkgids += static_cast<PackageKitResource *>(res)->availablePackageId();
#  825|           }
#  826|       }

Error: COMPILER_WARNING (CWE-477): [#def3]
plasma-discover-6.0.3-build/discover-6.0.3/libdiscover/backends/SnapBackend/SnapResource.cpp: scope_hint: In constructor ‘PlugsModel::PlugsModel(SnapResource*, SnapBackend*, QObject*)’
plasma-discover-6.0.3-build/discover-6.0.3/libdiscover/backends/SnapBackend/SnapResource.cpp:361:62: warning[-Wdeprecated-declarations]: ‘int QSnapdPlug::connectionCount() const’ is deprecated: Use connectedSlotCount()
#  361 |                     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.0.3-build/discover-6.0.3/libdiscover/backends/SnapBackend/SnapBackend.h:12: included_from: Included from here.
plasma-discover-6.0.3-build/discover-6.0.3/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;
#      |                                                         ^~~~~~~~~~~~~~~
#  359|                       // slot->snap() << slot->interface() << slot->label();
#  360|                       item->setCheckable(true);
#  361|->                     item->setCheckState(plug->connectionCount() > 0 ? Qt::Checked : Qt::Unchecked);
#  362|                       item->setData(plug->name(), PlugNameRole);
#  363|                       item->setData(slot->snap(), SlotSnapRole);

Error: CLANG_WARNING: [#def4]
plasma-discover-6.0.3-build/discover-6.0.3/libdiscover/backends/SnapBackend/SnapResource.cpp:399:16: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  397|               Q_EMIT error(new InlineMessage(InlineMessage::Error, u"error"_s, req->errorString()));
#  398|           }
#  399|->         return req->error() == QSnapdRequest::NoError;
#  400|       }
#  401|   

Error: CLANG_WARNING: [#def5]
plasma-discover-6.0.3-build/discover-6.0.3/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: [#def6]
plasma-discover-6.0.3-build/discover-6.0.3/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.0.3-1.fc40
store-results-to/tmp/tmpttplwr0u/plasma-discover-6.0.3-1.fc40.tar.xz
time-created2024-07-03 16:59:31
time-finished2024-07-03 17:04:32
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpttplwr0u/plasma-discover-6.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpttplwr0u/plasma-discover-6.0.3-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9