Error: COMPILER_WARNING (CWE-252): [#def1] ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp: scope_hint: In constructor ‘LinuxCpuPluginPrivate::LinuxCpuPluginPrivate(CpuPlugin*, const QString&)’ ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp:78:17: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’ # 78 | cpuinfo.open(QIODevice::ReadOnly); # | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/qt6/QtCore/QFile:1: included_from: Included from here. ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp:9: included_from: Included from here. /usr/include/qt6/QtCore/qfile.h:291:32: note: declared here # 291 | QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override; # | ^~~~ # 76| // Parse /proc/cpuinfo for information about cpus # 77| QFile cpuinfo(path); # 78|-> cpuinfo.open(QIODevice::ReadOnly); # 79| # 80| int cpuCount = 0; Error: COMPILER_WARNING (CWE-252): [#def2] ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp: scope_hint: In member function ‘virtual void LinuxCpuPluginPrivate::update()’ ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp:158:14: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’ # 158 | stat.open(QIODevice::ReadOnly); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/qt6/QtCore/qfile.h:291:32: note: declared here # 291 | QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override; # | ^~~~ # 156| // https://www.kernel.org/doc/html/latest/filesystems/proc.html#miscellaneous-kernel-statistics-in-proc-stat # 157| QFile stat(QStringLiteral("/proc/stat")); # 158|-> stat.open(QIODevice::ReadOnly); # 159| for (QByteArray line = stat.readLine(); !line.isNull(); line = stat.readLine()) { # 160| auto values = line.simplified().split(' '); Error: COMPILER_WARNING: [#def3] ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp: scope_hint: In member function ‘void LinuxCpuPluginPrivate::addSensorsAmd(const sensors_chip_name*)’ ksystemstats-6.5.4/plugins/cpu/linuxcpuplugin.cpp:245:29: warning[-Wunused-but-set-variable=]: variable ‘tccd’ set but not used # 245 | sensors_feature const * tccd[8] = {nullptr}; # | ^~~~ # 243| sensors_feature const * tctl = nullptr; # 244| sensors_feature const * tdie = nullptr; # 245|-> sensors_feature const * tccd[8] = {nullptr}; # 246| while (sensors_feature const * feature = sensors_get_features(chipName, &featureNumber)) { # 247| const QByteArray name (feature->name); Error: COMPILER_WARNING (CWE-252): [#def4] ksystemstats-6.5.4/plugins/disks/disks.cpp: scope_hint: In member function ‘virtual void DisksPlugin::update()’ ksystemstats-6.5.4/plugins/disks/disks.cpp:355:19: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’ # 355 | diskstats.open(QIODevice::ReadOnly | QIODevice::Text); # | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/qt6/QtCore/QFile:1: included_from: Included from here. /usr/include/KF6/KIOCore/kio/global.h:12: included_from: Included from here. /usr/include/KF6/KIOCore/kio/simplejob.h:13: included_from: Included from here. /usr/include/KF6/KIOCore/kio/filesystemfreespacejob.h:14: included_from: Included from here. /usr/include/KF6/KIOCore/KIO/FileSystemFreeSpaceJob:1: included_from: Included from here. ksystemstats-6.5.4/plugins/disks/disks.cpp:17: included_from: Included from here. /usr/include/qt6/QtCore/qfile.h:291:32: note: declared here # 291 | QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override; # | ^~~~ # 353| return; # 354| } # 355|-> diskstats.open(QIODevice::ReadOnly | QIODevice::Text); # 356| /* procfs-diskstats (See https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) # 357| The /proc/diskstats file displays the I/O statistics Error: COMPILER_WARNING: [#def5] ksystemstats-6.5.4/plugins/gpu/NvidiaSmiProcess.cpp: scope_hint: In member function ‘std::vector<NvidiaSmiProcess::GpuQueryResult> NvidiaSmiProcess::query()’ ksystemstats-6.5.4/plugins/gpu/NvidiaSmiProcess.cpp:44:9: warning[-Wunused-but-set-variable=]: variable ‘gpuCounter’ set but not used # 44 | int gpuCounter = 0; # | ^~~~~~~~~~ # 42| queryProcess.start(); # 43| # 44|-> int gpuCounter = 0; # 45| auto data = m_queryResult.end(); # 46| Error: COMPILER_WARNING (CWE-252): [#def6] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp: scope_hint: In member function ‘virtual void LinuxMemoryBackend::update()’ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:27:17: warning[-Wunused-result]: ignoring return value of ‘virtual bool QFile::open(QIODeviceBase::OpenMode)’, declared with attribute ‘nodiscard’ # 27 | meminfo.open(QIODevice::ReadOnly); # | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/qt6/QtCore/QFile:1: included_from: Included from here. ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:13: included_from: Included from here. /usr/include/qt6/QtCore/qfile.h:291:32: note: declared here # 291 | QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override; # | ^~~~ # 25| # 26| QFile meminfo(QStringLiteral("/proc/meminfo")); # 27|-> meminfo.open(QIODevice::ReadOnly); # 28| // The format of the file is as follows: # 29| // Fieldname:[whitespace]value kB Error: COMPILER_WARNING (CWE-457): [#def7] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:59:22: warning[-Wmaybe-uninitialized]: ‘available’ may be used uninitialized # 59 | m_free->setValue(available); # | ^~~~~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:37: note: ‘available’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~~~~~ # 57| m_total->setValue(total); # 58| m_used->setValue(total - available); # 59|-> m_free->setValue(available); # 60| m_application->setValue(total - free - cache - buffer - slab); # 61| m_cache->setValue(cache + slab); Error: COMPILER_WARNING (CWE-457): [#def8] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:60:35: warning[-Wmaybe-uninitialized]: ‘free’ may be used uninitialized # 60 | m_application->setValue(total - free - cache - buffer - slab); # | ~~~~~~^~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:31: note: ‘free’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~ # 58| m_used->setValue(total - available); # 59| m_free->setValue(available); # 60|-> m_application->setValue(total - free - cache - buffer - slab); # 61| m_cache->setValue(cache + slab); # 62| m_buffer->setValue(buffer); Error: COMPILER_WARNING (CWE-457): [#def9] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:60:35: warning[-Wmaybe-uninitialized]: ‘total’ may be used uninitialized # 60 | m_application->setValue(total - free - cache - buffer - slab); # | ~~~~~~^~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:24: note: ‘total’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~ # 58| m_used->setValue(total - available); # 59| m_free->setValue(available); # 60|-> m_application->setValue(total - free - cache - buffer - slab); # 61| m_cache->setValue(cache + slab); # 62| m_buffer->setValue(buffer); Error: COMPILER_WARNING (CWE-457): [#def10] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:61:29: warning[-Wmaybe-uninitialized]: ‘cache’ may be used uninitialized # 61 | m_cache->setValue(cache + slab); # | ~~~~~~^~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:56: note: ‘cache’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~ # 59| m_free->setValue(available); # 60| m_application->setValue(total - free - cache - buffer - slab); # 61|-> m_cache->setValue(cache + slab); # 62| m_buffer->setValue(buffer); # 63| m_swapTotal->setValue(swapTotal); Error: COMPILER_WARNING (CWE-457): [#def11] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:61:29: warning[-Wmaybe-uninitialized]: ‘slab’ may be used uninitialized # 61 | m_cache->setValue(cache + slab); # | ~~~~~~^~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:63: note: ‘slab’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~ # 59| m_free->setValue(available); # 60| m_application->setValue(total - free - cache - buffer - slab); # 61|-> m_cache->setValue(cache + slab); # 62| m_buffer->setValue(buffer); # 63| m_swapTotal->setValue(swapTotal); Error: COMPILER_WARNING (CWE-457): [#def12] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:62:24: warning[-Wmaybe-uninitialized]: ‘buffer’ may be used uninitialized # 62 | m_buffer->setValue(buffer); # | ^~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:48: note: ‘buffer’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~~ # 60| m_application->setValue(total - free - cache - buffer - slab); # 61| m_cache->setValue(cache + slab); # 62|-> m_buffer->setValue(buffer); # 63| m_swapTotal->setValue(swapTotal); # 64| m_swapUsed->setValue(swapTotal - swapFree); Error: COMPILER_WARNING (CWE-457): [#def13] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:64:36: warning[-Wmaybe-uninitialized]: ‘swapTotal’ may be used uninitialized # 64 | m_swapUsed->setValue(swapTotal - swapFree); # | ~~~~~~~~~~^~~~~~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:69: note: ‘swapTotal’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~~~~~ # 62| m_buffer->setValue(buffer); # 63| m_swapTotal->setValue(swapTotal); # 64|-> m_swapUsed->setValue(swapTotal - swapFree); # 65| m_swapFree->setValue(swapFree); # 66| } Error: COMPILER_WARNING (CWE-457): [#def14] ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:65:26: warning[-Wmaybe-uninitialized]: ‘swapFree’ may be used uninitialized # 65 | m_swapFree->setValue(swapFree); # | ^~~~~~~~ ksystemstats-6.5.4/plugins/memory/linuxbackend.cpp:32:80: note: ‘swapFree’ was declared here # 32 | unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree; # | ^~~~~~~~ # 63| m_swapTotal->setValue(swapTotal); # 64| m_swapUsed->setValue(swapTotal - swapFree); # 65|-> m_swapFree->setValue(swapFree); # 66| } # 67|
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-89.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | ksystemstats-6.5.4-1.fc44 |
| store-results-to | /tmp/tmpoiaij8hv/ksystemstats-6.5.4-1.fc44.tar.xz |
| time-created | 2026-01-08 18:32:10 |
| time-finished | 2026-01-08 18:34:36 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpoiaij8hv/ksystemstats-6.5.4-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpoiaij8hv/ksystemstats-6.5.4-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |