Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-674): [#def1]
ctags-6.0.0-build/universal-ctags-6.0.0/main/options.c: scope_hint: In function ‘processListRolesOptions’
ctags-6.0.0-build/universal-ctags-6.0.0/main/options.c:2245:13: warning[-Winfinite-recursion]: infinite recursion detected
# 2245 | static void processListRolesOptions (const char *const option CTAGS_ATTR_UNUSED,
#      |             ^~~~~~~~~~~~~~~~~~~~~~~
ctags-6.0.0-build/universal-ctags-6.0.0/main/options.c:2268:17: note: recursive call
# 2268 |                 processListRolesOptions (option, vStringValue (vstr));
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2243|   }
# 2244|   
# 2245|-> static void processListRolesOptions (const char *const option CTAGS_ATTR_UNUSED,
# 2246|   				     const char *const parameter)
# 2247|   {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
ctags-6.0.0-build/universal-ctags-6.0.0/main/rbtree.c: scope_hint: In function ‘rb_augment_erase_begin’
ctags-6.0.0-build/universal-ctags-6.0.0/main/rbtree.c:349:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  347|   	else {
#  348|   		deepest = rb_next(node);
#  349|-> 		if (deepest->rb_right)
#  350|   			deepest = deepest->rb_right;
#  351|   		else if (rb_parent(deepest) != node)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c: scope_hint: In function ‘eStrndup’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:324:9: warning[-Wanalyzer-null-argument]: use of NULL ‘eMalloc(len + 1)’ where non-null expected
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:323:24: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:323:24: note: in expansion of macro ‘xMalloc’
<built-in>: note: argument 1 of ‘__builtin_strncpy’ must be non-null
#  322|   {
#  323|   	char* result = xMalloc (len + 1, char);
#  324|-> 	strncpy (result, str, len);
#  325|   	result [len] = '\0';
#  326|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:354:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eMalloc(strlen(str) + 1) + (sizetype)i’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
#  352|   	int i = 0;
#  353|   	do
#  354|-> 		result [i] = tolower ((int) str [i]);
#  355|   	while (str [i++] != '\0');
#  356|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:354:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eMalloc(strlen(str) + 1)’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
#  352|   	int i = 0;
#  353|   	do
#  354|-> 		result [i] = tolower ((int) str [i]);
#  355|   	while (str [i++] != '\0');
#  356|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c: scope_hint: In function ‘newLowerString’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:354:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘eMalloc(strlen(str) + 1) + (sizetype)i’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
#  352|   	int i = 0;
#  353|   	do
#  354|-> 		result [i] = tolower ((int) str [i]);
#  355|   	while (str [i++] != '\0');
#  356|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c: scope_hint: In function ‘newLowerString’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:354:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘eMalloc(strlen(str) + 1)’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:351:30: note: in expansion of macro ‘xMalloc’
#  352|   	int i = 0;
#  353|   	do
#  354|-> 		result [i] = tolower ((int) str [i]);
#  355|   	while (str [i++] != '\0');
#  356|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:366:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eMalloc(strlen(str) + 1)’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:363:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:363:30: note: in expansion of macro ‘xMalloc’
#  364|   	int i = 0;
#  365|   	do
#  366|-> 		result [i] = toupper ((int) str [i]);
#  367|   	while (str [i++] != '\0');
#  368|   	return result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c: scope_hint: In function ‘newUpperString’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:366:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘eMalloc(strlen(str) + 1)’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:363:30: note: in expansion of macro ‘xMalloc’
ctags-6.0.0-build/universal-ctags-6.0.0/main/routines.c:363:30: note: in expansion of macro ‘xMalloc’
#  364|   	int i = 0;
#  365|   	do
#  366|-> 		result [i] = toupper ((int) str [i]);
#  367|   	while (str [i++] != '\0');
#  368|   	return result;

Error: COMPILER_WARNING (CWE-563): [#def10]
ctags-6.0.0-build/universal-ctags-6.0.0/parsers/yaml.c:33:20: warning[-Wunused-variable]: ‘tokenTypeName’ defined but not used
#   33 | static const char *tokenTypeName [] = {
#      |                    ^~~~~~~~~~~~~
#   31|   
#   32|   #define entry(X) [X] = #X
#   33|-> static const char *tokenTypeName [] = {
#   34|       entry (YAML_NO_TOKEN),
#   35|       entry (YAML_STREAM_START_TOKEN),

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
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-185.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namectags-6.1.0-1.fc42
diffbase-store-results-to/tmp/tmpw2yytpxp/ctags-6.1.0-1.fc42.tar.xz
diffbase-time-created2024-11-12 23:31:03
diffbase-time-finished2024-11-12 23:34:30
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpw2yytpxp/ctags-6.1.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpw2yytpxp/ctags-6.1.0-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-185.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namectags-6.0.0-6.fc41
store-results-to/tmp/tmp0nxr0bq1/ctags-6.0.0-6.fc41.tar.xz
time-created2024-11-12 23:26:56
time-finished2024-11-12 23:30:36
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp0nxr0bq1/ctags-6.0.0-6.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp0nxr0bq1/ctags-6.0.0-6.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9