Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/devinfo/devicelisting.cpp:135:9: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'solhelp'
#  133|       if (!dev.isValid()) {
#  134|           // Probably the device already disappeared again.
#  135|->         return;
#  136|       }
#  137|   

Error: COMPILER_WARNING (CWE-477): [#def2]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/kwinsupportinfo/main.cpp: scope_hint: In constructor ‘KCMKWinSupportInfo::KCMKWinSupportInfo(QObject*, const KPluginMetaData&)’
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/kwinsupportinfo/main.cpp:21:74: warning[-Wdeprecated-declarations]: ‘static QString QLibraryInfo::location(LibraryLocation)’ is deprecated: Use path()
#   21 |         m_outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
#      |                                                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/QLibraryInfo:1: included_from: Included from here.
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/kwinsupportinfo/main.cpp:9: included_from: Included from here.
/usr/include/qt6/QtCore/qlibraryinfo.h:48:20: note: declared here
#   48 |     static QString location(LibraryLocation location)
#      |                    ^~~~~~~~
#   19|           : KQuickConfigModule(parent, data)
#   20|       {
#   21|->         m_outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
#   22|                                                      {QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
#   23|                                                      parent);

Error: COMPILER_WARNING: [#def3]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp: scope_hint: In constructor ‘USBDB::USBDB()’
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp:53:50: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
#   53 |                 id = match.capturedView(1).toInt(0, 16);
#      |                                                  ^
#   51|               QRegularExpressionMatch match;
#   52|               if (line.startsWith('C') && (match = cls.match(line)).hasMatch()) {
#   53|->                 id = match.capturedView(1).toInt(0, 16);
#   54|                   const QString name = match.capturedView(2).trimmed().toString();
#   55|                   _classes.insert(QStringLiteral("%1").arg(id), name);

Error: COMPILER_WARNING: [#def4]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp:57:64: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
#   57 |                 const int protid = match.capturedView(1).toInt(0, 16);
#      |                                                                ^
#   55|                   _classes.insert(QStringLiteral("%1").arg(id), name);
#   56|               } else if (id >= 0 && subid >= 0 && (match = prot.match(line)).hasMatch()) {
#   57|->                 const int protid = match.capturedView(1).toInt(0, 16);
#   58|                   const QString name = match.capturedView(2).trimmed().toString();
#   59|                   _classes.insert(QStringLiteral("%1-%2-%3").arg(id).arg(subid).arg(protid), name);

Error: COMPILER_WARNING: [#def5]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp:61:53: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
#   61 |                 subid = match.capturedView(1).toInt(0, 16);
#      |                                                     ^
#   59|                   _classes.insert(QStringLiteral("%1-%2-%3").arg(id).arg(subid).arg(protid), name);
#   60|               } else if (id >= 0 && (match = subclass.match(line)).hasMatch()) {
#   61|->                 subid = match.capturedView(1).toInt(0, 16);
#   62|                   const QString name = match.capturedView(2).trimmed().toString();
#   63|                   _classes.insert(QStringLiteral("%1-%2").arg(id).arg(subid), name);

Error: COMPILER_WARNING: [#def6]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp:65:50: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
#   65 |                 id = match.capturedView(1).toInt(0, 16);
#      |                                                  ^
#   63|                   _classes.insert(QStringLiteral("%1-%2").arg(id).arg(subid), name);
#   64|               } else if ((match = vendor.match(line)).hasMatch()) {
#   65|->                 id = match.capturedView(1).toInt(0, 16);
#   66|                   const QString name = match.captured(2);
#   67|                   _ids.insert(QStringLiteral("%1").arg(id), name);

Error: COMPILER_WARNING: [#def7]
kinfocenter-6.0.3-build/kinfocenter-6.0.3/Modules/usbview/usbdb.cpp:69:53: warning[-Wzero-as-null-pointer-constant]: zero as null pointer constant
#   69 |                 subid = match.capturedView(1).toInt(0, 16);
#      |                                                     ^
#   67|                   _ids.insert(QStringLiteral("%1").arg(id), name);
#   68|               } else if (id >= 0 && (match = product.match(line)).hasMatch()) {
#   69|->                 subid = match.capturedView(1).toInt(0, 16);
#   70|                   const QString name = match.capturedView(2).trimmed().toString();
#   71|                   _ids.insert(QStringLiteral("%1-%2").arg(id).arg(subid), name);

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
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-72.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namekinfocenter-6.1.1-1.fc41
diffbase-store-results-to/tmp/tmpyau9ur0q/kinfocenter-6.1.1-1.fc41.tar.xz
diffbase-time-created2024-07-03 14:23:18
diffbase-time-finished2024-07-03 14:25:32
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpyau9ur0q/kinfocenter-6.1.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpyau9ur0q/kinfocenter-6.1.1-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-72.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namekinfocenter-6.0.3-1.fc40
store-results-to/tmp/tmpvyauupe2/kinfocenter-6.0.3-1.fc40.tar.xz
time-created2024-07-03 14:20:13
time-finished2024-07-03 14:23:06
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpvyauupe2/kinfocenter-6.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpvyauupe2/kinfocenter-6.0.3-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9