libksysguard-6.1.1-1.fc41

List of Defects

Error: COMPILER_WARNING (CWE-477): [#def1]
libksysguard-6.1.1-build/libksysguard-6.1.1/faces/SensorFaceController.cpp: scope_hint: In member function ‘void KSysGuard::SensorFaceController::loadPreset(const QString&)’
libksysguard-6.1.1-build/libksysguard-6.1.1/faces/SensorFaceController.cpp:922:42: warning[-Wdeprecated-declarations]: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType().
#  922 |                 if (item->property().type() == QVariant::StringList) {
#      |                     ~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qvariant.h:432:10: note: declared here
#  432 |     Type type() const
#      |          ^~~~
#  920|               KConfigSkeletonItem *item = d->faceConfigLoader->findItemByName(key);
#  921|               if (item) {
#  922|->                 if (item->property().type() == QVariant::StringList) {
#  923|                       item->setProperty(presetGroup.readEntry(key, QStringList()));
#  924|                   } else {

Error: COMPILER_WARNING: [#def2]
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.cpp: scope_hint: In function ‘KSysGuard::Unit KSysGuard::adjustedUnit(qreal, Unit, MetricPrefix)’
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.cpp:379:38: warning[-Wdeprecated-enum-enum-conversion]: arithmetic between different enumeration types ‘KSysGuard::MetricPrefix’ and ‘const KSysGuard::Unit’ is deprecated
#  379 |     const Unit newUnit = Unit(prefix + baseUnit);
#      |                               ~~~~~~~^~~~~~~~~~
#  377|       }
#  378|   
#  379|->     const Unit newUnit = Unit(prefix + baseUnit);
#  380|       // If there is no prefixed unit,
#  381|       // don't overflow into the following unrelated units.

Error: COMPILER_WARNING (CWE-477): [#def3]
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.cpp: scope_hint: In function ‘QString KSysGuard::formatNumber(const QVariant&, Unit, MetricPrefix, FormatOptions)’
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.cpp:402:38: warning[-Wdeprecated-declarations]: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType().
#  402 |     const int precision = (value.type() != QVariant::Double && adjusted <= unit) ? 0 : 1;
#      |                            ~~~~~~~~~~^~
/usr/include/qt6/QtCore/QVariant:1: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.h:15: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/formatter/Formatter.cpp:10: included_from: Included from here.
/usr/include/qt6/QtCore/qvariant.h:432:10: note: declared here
#  432 |     Type type() const
#      |          ^~~~
#  400|       }
#  401|   
#  402|->     const int precision = (value.type() != QVariant::Double && adjusted <= unit) ? 0 : 1;
#  403|       const QString text = QLocale().toString(amount, 'f', precision);
#  404|   

Error: CLANG_WARNING: [#def4]
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/helper.cpp:131:1: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  129|   }
#  130|   
#  131|-> KAUTH_HELPER_MAIN("org.kde.ksysguard.processlisthelper", KSysGuardProcessListHelper)

Error: CPPCHECK_WARNING: [#def5]
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/plugins/network/helper/ConnectionMapping.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-909): [#def6]
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/plugins/network/helper/ConnectionMapping.cpp:109: error[uninitStructMember]: Uninitialized struct member: result.direction
#  107|   
#  108|       if (sourceInode == m_oldState.addressToInode.end() && destInode == m_oldState.addressToInode.end()) {
#  109|->         return result;
#  110|       }
#  111|   

Error: CPPCHECK_WARNING (CWE-457): [#def7]
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/plugins/network/helper/ConnectionMapping.cpp:109: error[uninitvar]: Uninitialized variable: result.direction
#  107|   
#  108|       if (sourceInode == m_oldState.addressToInode.end() && destInode == m_oldState.addressToInode.end()) {
#  109|->         return result;
#  110|       }
#  111|   

Error: CLANG_WARNING: [#def8]
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/processes_local_p.cpp:8: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/processcore/processes_linux_p.cpp:248:10: warning[deadcode.DeadStores]: Although the value stored to 'size' is used in the enclosing expression, the value is never actually read from 'size'
#  246|   
#  247|       int size; // amount of data read in
#  248|->     if ((size = d->mFile.readLine(d->mBuffer, sizeof(d->mBuffer))) <= 0) { //-1 indicates nothing read
#  249|           d->mFile.close();
#  250|           return -1;

Error: COMPILER_WARNING (CWE-477): [#def9]
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.cpp: scope_hint: At global scope
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.cpp:163:31: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#  163 | QVariant::Type Sensor::type() const
#      |                               ^~~~~
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#  161|   }
#  162|   
#  163|-> QVariant::Type Sensor::type() const
#  164|   {
#  165|       return d->sensorInfo.variantType;

Error: COMPILER_WARNING (CWE-477): [#def10]
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.cpp: scope_hint: In member function ‘QVariant KSysGuard::Sensor::value() const’
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.cpp:171:50: warning[-Wdeprecated-declarations]: ‘QVariant::QVariant(Type)’ is deprecated: Use the constructor taking a QMetaType instead.
#  171 |         return QVariant{d->sensorInfo.variantType};
#      |                                                  ^
/usr/include/qt6/QtCore/qvariant.h:428:14: note: declared here
#  428 |     explicit QVariant(Type type)
#      |              ^~~~~~~~
#  169|   {
#  170|       if (!d->value.isValid()) {
#  171|->         return QVariant{d->sensorInfo.variantType};
#  172|       }
#  173|       return d->value;

Error: COMPILER_WARNING (CWE-477): [#def11]
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/SensorTreeModel.cpp:22: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.h: scope_hint: At global scope
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/Sensor.h:157:27: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#  157 |     QVariant::Type type() const;
#      |                           ^~~~~
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#  155|       qreal minimum() const;
#  156|       qreal maximum() const;
#  157|->     QVariant::Type type() const;
#  158|       /**
#  159|        * This signal is emitted when any of the metadata properties change.

Error: CLANG_WARNING: [#def12]
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/SensorTreeModel.cpp:153:24: warning[core.CallAndMessage]: Called C++ object pointer is null
#  151|       SensorTreeItem *item = rootItem;
#  152|       for (auto segment : segments) {
#  153|->         if (auto itr = item->children.find(segment); itr != item->children.end() && itr->second) {
#  154|               item = itr->second.get();
#  155|           } else {

Error: COMPILER_WARNING (CWE-477): [#def13]
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/SensorUnitModel.cpp: scope_hint: In member function ‘virtual QVariant KSysGuard::SensorUnitModel::data(const QModelIndex&, int) const’
libksysguard-6.1.1-build/libksysguard-6.1.1/sensors/SensorUnitModel.cpp:104:45: warning[-Wdeprecated-declarations]: ‘QMap<KSysGuard::Unit, UnitInfo>::iterator operator+(QMap<KSysGuard::Unit, UnitInfo>::iterator, QMap<KSysGuard::Unit, UnitInfo>::iterator::difference_type)’ is deprecated: Use std::next; QMap iterators are not random access
#  104 |     auto itr = d->units.begin() + index.row();
#      |                                             ^
/usr/include/qt6/QtCore/qdebug.h:31: included_from: Included from here.
/usr/include/qt6/QtCore/qvariant.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qmap.h:474:25: note: declared here
#  474 |         friend iterator operator+(iterator it, difference_type j) { return std::next(it, j); }
#      |                         ^~~~~~~~
#  102|       }
#  103|   
#  104|->     auto itr = d->units.begin() + index.row();
#  105|       auto entry = itr.value();
#  106|   

Error: COMPILER_WARNING (CWE-477): [#def14]
libksysguard-6.1.1-build/libksysguard-6.1.1/redhat-linux-build/systemstats/org.kde.ksystemstats1.h:22: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/redhat-linux-build/systemstats/org.kde.ksystemstats1.cpp:12: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorInfo.h:32:44: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#   32 |     QVariant::Type variantType = QVariant::Invalid;
#      |                                            ^~~~~~~
/usr/include/qt6/QtCore/QVariant:1: included_from: Included from here.
libksysguard-6.1.1-build/libksysguard-6.1.1/redhat-linux-build/systemstats/org.kde.ksystemstats1.h:20: included_from: Included from here.
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#   30|       QString shortName; // Shorter translated name of the sensor, to use when space is constrained.
#   31|       QString description; // Translated description of the sensor.
#   32|->     QVariant::Type variantType = QVariant::Invalid;
#   33|       KSysGuard::Unit unit = KSysGuard::UnitInvalid; // Both a format hint and implies data type (i.e double/string)
#   34|       qreal min = 0;

Error: COMPILER_WARNING (CWE-477): [#def15]
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorInfo.h: scope_hint: In function ‘const QDBusArgument& KSysGuard::operator>>(const QDBusArgument&, SensorInfo&)’
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorInfo.h:76:43: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#   76 |     s.variantType = static_cast<QVariant::Type>(t);
#      |                                           ^~~~
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#   74|       uint32_t t;
#   75|       argument >> t;
#   76|->     s.variantType = static_cast<QVariant::Type>(t);
#   77|       argument >> t;
#   78|       s.unit = static_cast<KSysGuard::Unit>(t);

Error: COMPILER_WARNING (CWE-477): [#def16]
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorProperty.cpp:164:56: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#  164 | void SensorProperty::setVariantType(QVariant::Type type)
#      |                                                        ^
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#  162|   }
#  163|   
#  164|-> void SensorProperty::setVariantType(QVariant::Type type)
#  165|   {
#  166|       if (d->info.variantType == type) {

Error: COMPILER_WARNING (CWE-477): [#def17]
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorProperty.h: scope_hint: At global scope
libksysguard-6.1.1-build/libksysguard-6.1.1/systemstats/SensorProperty.h:84:44: warning[-Wdeprecated-declarations]: ‘Type’ is deprecated: Use QMetaType::Type instead.
#   84 |     void setVariantType(QVariant::Type type);
#      |                                            ^
/usr/include/qt6/QtCore/qvariant.h:142:70: note: declared here
#  142 |     enum QT_DEPRECATED_VERSION_X_6_0("Use QMetaType::Type instead.") Type
#      |                                                                      ^~~~
#   82|       void setMax(SensorProperty *other);
#   83|       void setUnit(KSysGuard::Unit unit);
#   84|->     void setVariantType(QVariant::Type type);
#   85|   
#   86|       bool isSubscribed() const;

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-71.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibksysguard-6.1.1-1.fc41
store-results-to/tmp/tmp107sx66f/libksysguard-6.1.1-1.fc41.tar.xz
time-created2024-07-03 14:52:55
time-finished2024-07-03 14:56:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp107sx66f/libksysguard-6.1.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp107sx66f/libksysguard-6.1.1-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9