Fixed defects

List of Defects

Error: CLANG_WARNING: [#def1]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/qmake/option.cpp:427:23: warning[core.NullDereference]: Array access (from variable 'argv') results in a null pointer dereference
#  425|                   Option::mkfile::project_files.append(proj);
#  426|               if(Option::mkfile::project_files.isEmpty()) {
#  427|->                 usage(argv[0]);
#  428|                   return Option::QMAKE_CMDLINE_ERROR;
#  429|               }

Error: CLANG_WARNING: [#def2]
<built-in>:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx:5: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/global/qt_pch.h:30: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qcoreapplication.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.h:10: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qcoreevent.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreevent.h:9: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qobjectdefs.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs.h:425:9: warning[cplusplus.NewDeleteLeaks]: Potential memory leak
#  423|                         "QMetaObject::invokeMethod cannot call functions with arguments!");
#  424|           using Prototype = typename QtPrivate::Callable<Func>::Function;
#  425|->         return invokeMethodImpl(object, QtPrivate::makeCallableObject<Prototype>(std::forward<Func>(function)), type, ret);
#  426|       }
#  427|   

Error: CLANG_WARNING: [#def3]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qmetatype.cpp:6: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qmetatype.h:14: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qfloat16.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/global/qfloat16.h:9: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qhashfunctions.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/tools/qhashfunctions.h:8: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qstring.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/text/qstring.h:22: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qanystringview.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/text/qanystringview.h:122:27: warning[core.NullDereference]: Array access (from variable 'str') results in a null pointer dereference
#  120|           } else {
#  121|               for (qsizetype i = 0; i < sz; ++i) {
#  122|->                 if (uchar(str[i]) > 0x7f)
#  123|                       return false;
#  124|               }

Error: COMPILER_WARNING: [#def4]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qfutureinterface.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/thread/qpromise.h:8: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/redhat-linux-build/include/QtCore/qpromise.h:1: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:29: included_from: Included from here.
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/thread/qfutureinterface.h:472:37: warning[-Wtemplate-id-cdtor]: template-id not allowed for constructor in C++20
#  472 |     explicit QFutureInterface<void>(State initialState = NoState)
#      |                                     ^~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/corelib/thread/qfutureinterface.h:472:37: note: remove the ‘< >’
#  470|   {
#  471|   public:
#  472|->     explicit QFutureInterface<void>(State initialState = NoState)
#  473|           : QFutureInterfaceBase(initialState)
#  474|       { }

Error: CLANG_WARNING: [#def5]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/dbus/qdbusmessage.cpp:503:36: warning[cplusplus.NewDelete]: Use of memory after it is freed
#  501|   {
#  502|       QDBusMessage msg = createErrorReply(QDBusError::errorString(atype), amsg);
#  503|->     msg.d_ptr->parametersValidated = true;
#  504|       return msg;
#  505|   }

Error: CLANG_WARNING: [#def6]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/dbus/qdbusmessage.cpp:537:16: warning[cplusplus.NewDelete]: Attempt to delete released memory
#  535|   {
#  536|       if (!d_ptr->ref.deref())
#  537|->         delete d_ptr;
#  538|   }
#  539|   

Error: COMPILER_WARNING: [#def7]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/gui/painting/qpaintengine_raster.cpp: scope_hint: In member function ‘void QClipData::initialize()’
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/gui/painting/qpaintengine_raster.cpp:3809:42: warning[-Wcalloc-transposed-args]: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 3809 |         m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight);
#      |                                          ^~~~~~~~~~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/gui/painting/qpaintengine_raster.cpp:3809:42: note: earlier argument should specify number of elements, later size of each element
# 3807|   
# 3808|       if (!m_clipLines)
# 3809|->         m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight);
# 3810|   
# 3811|       Q_CHECK_PTR(m_clipLines);

Error: CLANG_WARNING: [#def8]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/network/kernel/qhostinfo.cpp:818:12: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'runnable'
#  816|       }
#  817|   #endif // Q_OS_WASM
#  818|->     return id;
#  819|   }
#  820|   

Error: CLANG_WARNING: [#def9]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/printsupport/kernel/qprinterinfo.cpp:25:13: warning[cplusplus.NewDelete]: Argument to 'delete' is the address of a global variable, which is not memory allocated by 'new'
#   23|       {
#   24|           if (d != shared_null)
#   25|->             delete d;
#   26|       }
#   27|   };

Error: COMPILER_WARNING: [#def10]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp: scope_hint: In function ‘int main(int, char**)’
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:260:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  260 |         const StringEnum &location = parseLocationOrError(parser.value(display));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:260:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(display))’
#  260 |         const StringEnum &location = parseLocationOrError(parser.value(display));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  258|   #endif
#  259|       if (parser.isSet(display)) {
#  260|->         const StringEnum &location = parseLocationOrError(parser.value(display));
#  261|           QString text = QStandardPaths::displayName(location.enumvalue);
#  262|           results << location.mapName(text);

Error: COMPILER_WARNING: [#def11]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:266:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  266 |         const StringEnum &location = parseLocationOrError(parser.value(paths));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:266:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(paths))’
#  266 |         const StringEnum &location = parseLocationOrError(parser.value(paths));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
#  264|   
#  265|       if (parser.isSet(paths)) {
#  266|->         const StringEnum &location = parseLocationOrError(parser.value(paths));
#  267|           QStringList paths = QStandardPaths::standardLocations(location.enumvalue);
#  268|           results << location.mapName(paths.join(pathsep));

Error: COMPILER_WARNING: [#def12]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:272:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  272 |         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:272:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(writablePath))’
#  272 |         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  270|   
#  271|       if (parser.isSet(writablePath)) {
#  272|->         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#  273|           QString path = QStandardPaths::writableLocation(location.enumvalue);
#  274|           results << location.mapName(path);

Error: COMPILER_WARNING: [#def13]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:284:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  284 |         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:284:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(locateDir))’
#  284 |         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#  282|   
#  283|       if (parser.isSet(locateDir)) {
#  284|->         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#  285|           QString searchitem = searchStringOrError(&parser);
#  286|           QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);

Error: COMPILER_WARNING: [#def14]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:291:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  291 |         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:291:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(locateFile))’
#  291 |         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#  289|   
#  290|       if (parser.isSet(locateFile)) {
#  291|->         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#  292|           QString searchitem = searchStringOrError(&parser);
#  293|           QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateFile);

Error: COMPILER_WARNING: [#def15]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:298:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  298 |         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:298:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(locateDirs))’
#  298 |         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#  296|   
#  297|       if (parser.isSet(locateDirs)) {
#  298|->         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#  299|           QString searchitem = searchStringOrError(&parser);
#  300|           QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);

Error: COMPILER_WARNING: [#def16]
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:305:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  305 |         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#      |                           ^~~~~~~~
qt6-qtbase-6.6.2-build/qtbase-everywhere-src-6.6.2/src/tools/qtpaths/qtpaths.cpp:305:58: note: the temporary was destroyed at the end of the full expression ‘parseLocationOrError(QCommandLineParser::value(const QCommandLineOption&) const(locateFiles))’
#  305 |         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#      |                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  303|   
#  304|       if (parser.isSet(locateFiles)) {
#  305|->         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#  306|           QString searchitem = searchStringOrError(&parser);
#  307|           QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateFile);

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-169.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-nameqt6-qtbase-6.7.2-1.fc41
diffbase-store-results-to/tmp/tmpb3x0bzu_/qt6-qtbase-6.7.2-1.fc41.tar.xz
diffbase-time-created2024-07-03 18:38:32
diffbase-time-finished2024-07-03 19:38:26
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpb3x0bzu_/qt6-qtbase-6.7.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpb3x0bzu_/qt6-qtbase-6.7.2-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-169.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameqt6-qtbase-6.6.2-7.fc40
store-results-to/tmp/tmpsg_3l40k/qt6-qtbase-6.6.2-7.fc40.tar.xz
time-created2024-07-03 17:39:05
time-finished2024-07-03 18:38:04
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpsg_3l40k/qt6-qtbase-6.6.2-7.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpsg_3l40k/qt6-qtbase-6.6.2-7.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9