Fixed findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-252): [#def1]
/usr/bin/qt-cmake:5:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
#    4|   script_dir_path=`dirname $0`
#    5|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    6|   
#    7|   # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.

Error: SHELLCHECK_WARNING (CWE-252): [#def2]
/usr/bin/qt-cmake-create:8:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    6|   # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
#    7|   script_dir_path=`dirname $0`
#    8|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    9|   
#   10|   # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.

Error: SHELLCHECK_WARNING (CWE-252): [#def3]
/usr/lib64/qt6/bin/qt-cmake:5:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
#    4|   script_dir_path=`dirname $0`
#    5|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    6|   
#    7|   # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.

Error: SHELLCHECK_WARNING (CWE-252): [#def4]
/usr/lib64/qt6/bin/qt-cmake-create:8:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    6|   # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
#    7|   script_dir_path=`dirname $0`
#    8|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    9|   
#   10|   # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.

Error: SHELLCHECK_WARNING (CWE-252): [#def5]
/usr/lib64/qt6/libexec/qt-cmake-private:5:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
#    4|   script_dir_path=`dirname $0`
#    5|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    6|   
#    7|   # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.

Error: SHELLCHECK_WARNING (CWE-252): [#def6]
/usr/lib64/qt6/libexec/qt-internal-configure-examples:3:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    1|   #!/usr/bin/sh
#    2|   script_dir_path=`dirname $0`
#    3|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    4|   
#    5|   "$script_dir_path/../bin/qt-cmake" -DQT_BUILD_STANDALONE_EXAMPLES=ON -DQT_BUILD_TESTS=OFF -DQT_USE_ORIGINAL_COMPILER=ON "$@"

Error: SHELLCHECK_WARNING (CWE-252): [#def7]
/usr/lib64/qt6/libexec/qt-internal-configure-tests:3:19: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    1|   #!/usr/bin/sh
#    2|   script_dir_path=`dirname $0`
#    3|-> script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
#    4|   
#    5|   "$script_dir_path/../bin/qt-cmake" -DQT_BUILD_STANDALONE_TESTS=ON -DQT_BUILD_EXAMPLES=OFF -DQT_USE_ORIGINAL_COMPILER=ON "$@"

Error: SHELLCHECK_WARNING (CWE-563): [#def8]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:36:18: warning[SC2034]: key appears unused. Verify use (or export if used externally).
#   34|   
#   35|   get_entry() {
#   36|->     local map=$1 key=$2
#   37|       local i="${map}_map_${2}"
#   38|       printf '%s' "${!i}"

Error: SHELLCHECK_WARNING (CWE-457): [#def9]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:56:42: warning[SC2154]: original_ld is referenced but not assigned.
#   54|   
#   55|   link_binary() {
#   56|->     (PS4=; test $silent -ne 1 && set -x; $original_ld "${linker_arguments[@]}" "$@") 2>&1 || exit 1
#   57|   }
#   58|   

Error: SHELLCHECK_WARNING (CWE-398): [#def10]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:138:9: warning[SC2178]: Variable was used as an array but is now assigned a string.
#  136|           fi
#  137|   
#  138|->         classname=$(get_entry address_to_classname $classname_address)
#  139|           if [ -z "$classname" ]; then
#  140|               echo " 💥  Failed to resolve class name for address '$classname_address'"

Error: SHELLCHECK_WARNING (CWE-670): [#def11]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:139:18: warning[SC2128]: Expanding an array without an index only gives the first element.
#  137|   
#  138|           classname=$(get_entry address_to_classname $classname_address)
#  139|->         if [ -z "$classname" ]; then
#  140|               echo " 💥  Failed to resolve class name for address '$classname_address'"
#  141|               continue

Error: SHELLCHECK_WARNING (CWE-457): [#def12]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:144:15: warning[SC2154]: exclude_list is referenced but not assigned.
#  142|           fi
#  143|   
#  144|->         if [[ $exclude_list =~ $classname || $classname =~ $exclude_regex ]]; then
#  145|               if [ $is_metaclass -eq 1 ]; then
#  146|                   class_type="meta class"

Error: SHELLCHECK_WARNING (CWE-457): [#def13]
/usr/lib64/qt6/mkspecs/features/data/mac/objc_namespace.sh:144:60: warning[SC2154]: exclude_regex is referenced but not assigned.
#  142|           fi
#  143|   
#  144|->         if [[ $exclude_list =~ $classname || $classname =~ $exclude_regex ]]; then
#  145|               if [ $is_metaclass -eq 1 ]; then
#  146|                   class_type="meta class"

Error: COMPILER_WARNING: [#def14]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp: scope_hint: In function ‘int main(int, char**)’
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:259:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  259 |         const StringEnum &location = parseLocationOrError(parser.value(display));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:259:71: note: ‘QString’ temporary created here
#  259 |         const StringEnum &location = parseLocationOrError(parser.value(display));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~
#  257|   #endif
#  258|       if (parser.isSet(display)) {
#  259|->         const StringEnum &location = parseLocationOrError(parser.value(display));
#  260|           QString text = QStandardPaths::displayName(location.enumvalue);
#  261|           results << location.mapName(text);

Error: COMPILER_WARNING: [#def15]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:265:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  265 |         const StringEnum &location = parseLocationOrError(parser.value(paths));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:265:71: note: ‘QString’ temporary created here
#  265 |         const StringEnum &location = parseLocationOrError(parser.value(paths));
#      |                                                           ~~~~~~~~~~~~^~~~~~~
#  263|   
#  264|       if (parser.isSet(paths)) {
#  265|->         const StringEnum &location = parseLocationOrError(parser.value(paths));
#  266|           QStringList paths = QStandardPaths::standardLocations(location.enumvalue);
#  267|           results << location.mapName(paths.join(pathsep));

Error: COMPILER_WARNING: [#def16]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:271:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  271 |         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:271:71: note: ‘QString’ temporary created here
#  271 |         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~~~~~~
#  269|   
#  270|       if (parser.isSet(writablePath)) {
#  271|->         const StringEnum &location = parseLocationOrError(parser.value(writablePath));
#  272|           QString path = QStandardPaths::writableLocation(location.enumvalue);
#  273|           results << location.mapName(path);

Error: COMPILER_WARNING: [#def17]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:283:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  283 |         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:283:71: note: ‘QString’ temporary created here
#  283 |         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~~~
#  281|   
#  282|       if (parser.isSet(locateDir)) {
#  283|->         const StringEnum &location = parseLocationOrError(parser.value(locateDir));
#  284|           QString searchitem = searchStringOrError(&parser);
#  285|           QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);

Error: COMPILER_WARNING: [#def18]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:290:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  290 |         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:290:71: note: ‘QString’ temporary created here
#  290 |         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~~~~
#  288|   
#  289|       if (parser.isSet(locateFile)) {
#  290|->         const StringEnum &location = parseLocationOrError(parser.value(locateFile));
#  291|           QString searchitem = searchStringOrError(&parser);
#  292|           QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateFile);

Error: COMPILER_WARNING: [#def19]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:297:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  297 |         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:297:71: note: ‘QString’ temporary created here
#  297 |         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~~~~
#  295|   
#  296|       if (parser.isSet(locateDirs)) {
#  297|->         const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
#  298|           QString searchitem = searchStringOrError(&parser);
#  299|           QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);

Error: COMPILER_WARNING: [#def20]
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:304:27: warning[-Wdangling-reference]: possibly dangling reference to a temporary
#  304 |         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#      |                           ^~~~~~~~
qtbase-everywhere-src-6.8.2/src/tools/qtpaths/qtpaths.cpp:304:71: note: ‘QString’ temporary created here
#  304 |         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#      |                                                           ~~~~~~~~~~~~^~~~~~~~~~~~~
#  302|   
#  303|       if (parser.isSet(locateFiles)) {
#  304|->         const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
#  305|           QString searchitem = searchStringOrError(&parser);
#  306|           QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateFile);

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
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-226.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameqt6-qtbase-6.9.0-1.fc43
diffbase-store-results-to/tmp/tmpbcjda_h6/qt6-qtbase-6.9.0-1.fc43.tar.xz
diffbase-time-created2025-04-25 15:40:50
diffbase-time-finished2025-04-25 16:05:36
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpbcjda_h6/qt6-qtbase-6.9.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpbcjda_h6/qt6-qtbase-6.9.0-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-226.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-nameqt6-qtbase-6.8.2-3.fc42
store-results-to/tmp/tmp27r4jrzq/qt6-qtbase-6.8.2-3.fc42.tar.xz
time-created2025-04-25 15:16:05
time-finished2025-04-25 15:40:14
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp27r4jrzq/qt6-qtbase-6.8.2-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp27r4jrzq/qt6-qtbase-6.8.2-3.fc42.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9