Fixed defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
wayland-1.22.0-build/wayland-1.22.0/cursor/xcursor.c: scope_hint: In function ‘xcursor_file_best_size’
wayland-1.22.0-build/wayland-1.22.0/cursor/xcursor.c:343:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.type’
/usr/include/string.h:33: included_from: Included from here.
wayland-1.22.0-build/wayland-1.22.0/cursor/xcursor.c:31: included_from: Included from here.
#  341|   
#  342|   	for (n = 0; n < file_header->ntoc; n++) {
#  343|-> 		if (file_header->tocs[n].type != XCURSOR_IMAGE_TYPE)
#  344|   			continue;
#  345|   		this_size = file_header->tocs[n].subtype;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c: scope_hint: In function ‘ring_buffer_put’
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:88:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:62:19: note: in definition of macro ‘MASK’
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:62:19: note: in definition of macro ‘MASK’
#   86|   	head = MASK(b->head);
#   87|   	if (head + count <= sizeof b->data) {
#   88|-> 		memcpy(b->data + head, data, count);
#   89|   	} else {
#   90|   		size = sizeof b->data - head;

Error: CLANG_WARNING: [#def3]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:624:35: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
#  622|   			break;
#  623|   		case 's':
#  624|-> 			if (!arg.nullable && args[i].s == NULL)
#  625|   				goto err_null;
#  626|   			break;

Error: CLANG_WARNING: [#def4]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:628:35: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
#  626|   			break;
#  627|   		case 'o':
#  628|-> 			if (!arg.nullable && args[i].o == NULL)
#  629|   				goto err_null;
#  630|   			break;

Error: CLANG_WARNING: [#def5]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:632:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  630|   			break;
#  631|   		case 'n':
#  632|-> 			object = args[i].o;
#  633|   			if (object == NULL)
#  634|   				goto err_null;

Error: CLANG_WARNING: [#def6]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:639:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
#  637|   			break;
#  638|   		case 'a':
#  639|-> 			if (args[i].a == NULL)
#  640|   				goto err_null;
#  641|   			break;

Error: CLANG_WARNING: [#def7]
wayland-1.22.0-build/wayland-1.22.0/src/connection.c:643:7: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  641|   			break;
#  642|   		case 'h':
#  643|-> 			fd = args[i].h;
#  644|   			dup_fd = wl_os_dupfd_cloexec(fd, 0);
#  645|   			if (dup_fd < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
wayland-1.22.0-build/wayland-1.22.0/tests/os-wrappers-test.c: scope_hint: In function ‘socket’
wayland-1.22.0-build/wayland-1.22.0/tests/os-wrappers-test.c:100:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘base_fd’
wayland-1.22.0-build/wayland-1.22.0/tests/os-wrappers-test.c:34: included_from: Included from here.
#   98|   	}
#   99|   
#  100|-> 	return real_socket(domain, type, protocol);
#  101|   }
#  102|   

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-5.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namewayland-1.23.0-1.fc41
diffbase-store-results-to/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.tar.xz
diffbase-time-created2024-07-03 18:19:30
diffbase-time-finished2024-07-03 18:20:50
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-5.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namewayland-1.22.0-3.fc40
store-results-to/tmp/tmpiy56inc1/wayland-1.22.0-3.fc40.tar.xz
time-created2024-07-03 18:17:07
time-finished2024-07-03 18:18:58
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpiy56inc1/wayland-1.22.0-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpiy56inc1/wayland-1.22.0-3.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9