ksystemstats-6.3.4-1.fc43

List of Findings

Error: COMPILER_WARNING (CWE-563): [#def1]
ksystemstats-6.3.4/plugins/cpu/linuxcpuplugin.cpp: scope_hint: In member function ‘void LinuxCpuPluginPrivate::addSensorsAmd(const sensors_chip_name*)’
ksystemstats-6.3.4/plugins/cpu/linuxcpuplugin.cpp:241:29: warning[-Wunused-but-set-variable]: variable ‘tccd’ set but not used
#  241 |     sensors_feature const * tccd[8] = {nullptr};
#      |                             ^~~~
#  239|       sensors_feature const * tctl = nullptr;
#  240|       sensors_feature const * tdie = nullptr;
#  241|->     sensors_feature const * tccd[8] = {nullptr};
#  242|       while (sensors_feature const * feature = sensors_get_features(chipName, &featureNumber)) {
#  243|           const QByteArray name (feature->name);

Error: COMPILER_WARNING (CWE-563): [#def2]
ksystemstats-6.3.4/plugins/gpu/LinuxBackend.cpp:20:20: warning[-Wunused-variable]: ‘intelVendor’ defined but not used
#   20 | static const char *intelVendor = "0x8086";
#      |                    ^~~~~~~~~~~
#   18|   // Vendor ID strings, as used in sysfs
#   19|   static const char *amdVendor = "0x1002";
#   20|-> static const char *intelVendor = "0x8086";
#   21|   static const char *nvidiaVendor = "0x10de";
#   22|   

Error: COMPILER_WARNING (CWE-457): [#def3]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:58:28: warning[-Wmaybe-uninitialized]: ‘available’ may be used uninitialized
#   58 |     m_used->setValue(total - available);
#      |                      ~~~~~~^~~~~~~~~~~
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:32:37: note: ‘available’ was declared here
#   32 |     unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree;
#      |                                     ^~~~~~~~~
#   56|       }
#   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);

Error: COMPILER_WARNING (CWE-457): [#def4]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp: scope_hint: In member function ‘LinuxMemoryBackend::update()’
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:58:28: warning[-Wmaybe-uninitialized]: ‘total’ may be used uninitialized
#   58 |     m_used->setValue(total - available);
#      |                      ~~~~~~^~~~~~~~~~~
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:32:24: note: ‘total’ was declared here
#   32 |     unsigned long long total, free, available, buffer, cache, slab, swapTotal, swapFree;
#      |                        ^~~~~
#   56|       }
#   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);

Error: COMPILER_WARNING (CWE-457): [#def5]
ksystemstats-6.3.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.3.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): [#def6]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:61:29: warning[-Wmaybe-uninitialized]: ‘cache’ may be used uninitialized
#   61 |     m_cache->setValue(cache + slab);
#      |                       ~~~~~~^~~~~~
ksystemstats-6.3.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): [#def7]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:61:29: warning[-Wmaybe-uninitialized]: ‘slab’ may be used uninitialized
#   61 |     m_cache->setValue(cache + slab);
#      |                       ~~~~~~^~~~~~
ksystemstats-6.3.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): [#def8]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:62:24: warning[-Wmaybe-uninitialized]: ‘buffer’ may be used uninitialized
#   62 |     m_buffer->setValue(buffer);
#      |                        ^~~~~~
ksystemstats-6.3.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): [#def9]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:64:36: warning[-Wmaybe-uninitialized]: ‘swapTotal’ may be used uninitialized
#   64 |     m_swapUsed->setValue(swapTotal - swapFree);
#      |                          ~~~~~~~~~~^~~~~~~~~~
ksystemstats-6.3.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): [#def10]
ksystemstats-6.3.4/plugins/memory/linuxbackend.cpp:65:26: warning[-Wmaybe-uninitialized]: ‘swapFree’ may be used uninitialized
#   65 |     m_swapFree->setValue(swapFree);
#      |                          ^~~~~~~~
ksystemstats-6.3.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|   

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-93.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameksystemstats-6.3.4-1.fc43
store-results-to/tmp/tmp__b4jwrh/ksystemstats-6.3.4-1.fc43.tar.xz
time-created2025-04-25 13:48:29
time-finished2025-04-25 13:50:47
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp__b4jwrh/ksystemstats-6.3.4-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp__b4jwrh/ksystemstats-6.3.4-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9