Fixed defects

List of Defects

Error: CPPCHECK_WARNING (CWE-562): [#def1]
pcre2-10.42-build/pcre2-10.42/src/pcre2_compile.c:8169: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 8167|     capitem.next = cb->open_caps;
# 8168|     capitem.assert_depth = cb->assert_depth;
# 8169|->   cb->open_caps = &capitem;
# 8170|     }
# 8171|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:143: included_from: Included from here.
pcre2-10.42-build/pcre2-10.42/src/pcre2_match.c:63: included_from: Included from here.
pcre2-10.42-build/pcre2-10.42/src/pcre2_match.c: scope_hint: In function 'match'
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:1997:51: warning[-Wanalyzer-null-dereference]: dereference of NULL 'P'
pcre2-10.42-build/pcre2-10.42/src/pcre2.h:798:25: note: in definition of macro 'PCRE2_JOIN'
pcre2-10.42-build/pcre2-10.42/src/pcre2.h:977:25: note: in expansion of macro 'PCRE2_GLUE'
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:1997:38: note: in expansion of macro 'PCRE2_SUFFIX'
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:177:20: note: in expansion of macro '_pcre2_script_run'
pcre2-10.42-build/pcre2-10.42/src/pcre2_match.c:5830:12: note: in expansion of macro 'PRIV'
pcre2-10.42-build/pcre2-10.42/src/pcre2_match.c:761:5: note: in expansion of macro 'Frdepth'
pcre2-10.42-build/pcre2-10.42/src/pcre2.h:798:25: note: in definition of macro 'PCRE2_JOIN'
pcre2-10.42-build/pcre2-10.42/src/pcre2.h:977:25: note: in expansion of macro 'PCRE2_GLUE'
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:1997:38: note: in expansion of macro 'PCRE2_SUFFIX'
pcre2-10.42-build/pcre2-10.42/src/pcre2_internal.h:177:20: note: in expansion of macro '_pcre2_script_run'
pcre2-10.42-build/pcre2-10.42/src/pcre2_match.c:5830:12: note: in expansion of macro 'PRIV'
# 1995|   #define _pcre2_memctl_malloc         PCRE2_SUFFIX(_pcre2_memctl_malloc_)
# 1996|   #define _pcre2_ord2utf               PCRE2_SUFFIX(_pcre2_ord2utf_)
# 1997|-> #define _pcre2_script_run            PCRE2_SUFFIX(_pcre2_script_run_)
# 1998|   #define _pcre2_strcmp                PCRE2_SUFFIX(_pcre2_strcmp_)
# 1999|   #define _pcre2_strcmp_c8             PCRE2_SUFFIX(_pcre2_strcmp_c8_)

Error: CLANG_WARNING: [#def3]
pcre2-10.42-build/pcre2-10.42/src/pcre2grep.c:2869:9: warning[deadcode.DeadStores]: Value stored to 'match' is never read
# 2867|           /* Prepare to repeat to find the next match in the line. */
# 2868|   
# 2869|->         match = FALSE;
# 2870|           if (line_buffered) fflush(stdout);
# 2871|           rc = 0;                      /* Had some success */

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-227.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namepcre2-10.44-1.fc41
diffbase-store-results-to/tmp/tmp_wiuq1lx/pcre2-10.44-1.fc41.tar.xz
diffbase-time-created2024-07-03 16:35:29
diffbase-time-finished2024-07-03 16:40:52
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp_wiuq1lx/pcre2-10.44-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp_wiuq1lx/pcre2-10.44-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-227.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepcre2-10.42-2.fc40.2
store-results-to/tmp/tmpkfhzh6c_/pcre2-10.42-2.fc40.2.tar.xz
time-created2024-07-03 16:29:19
time-finished2024-07-03 16:35:06
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpkfhzh6c_/pcre2-10.42-2.fc40.2.tar.xz' '--gcc-analyze' '/tmp/tmpkfhzh6c_/pcre2-10.42-2.fc40.2.src.rpm'
tool-versioncsmock-3.5.3-1.el9