Newly introduced defects

List of Defects

Error: COMPILER_WARNING (CWE-697): [#def1]
rsync-3.3.0-build/rsync-3.3.0/flist.c: scope_hint: In function ‘fattr_compare’
rsync-3.3.0-build/rsync-3.3.0/flist.c:293:13: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
#  293 |         if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
#      |             ^
rsync-3.3.0-build/rsync-3.3.0/flist.c:23: included_from: Included from here.
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
#  808 |         const char basename[];  /* The basename (AKA filename) follows */
#      |                    ^~~~~~~~
#  291|   	int diff;
#  292|   
#  293|-> 	if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
#  294|   		if (!f2->basename || !S_ISREG(f2->mode) || !len2)
#  295|   			return 0;

Error: COMPILER_WARNING (CWE-697): [#def2]
rsync-3.3.0-build/rsync-3.3.0/flist.c:294:21: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
#  294 |                 if (!f2->basename || !S_ISREG(f2->mode) || !len2)
#      |                     ^
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
#  808 |         const char basename[];  /* The basename (AKA filename) follows */
#      |                    ^~~~~~~~
#  292|   
#  293|   	if (!f1->basename || !S_ISREG(f1->mode) || !len1) {
#  294|-> 		if (!f2->basename || !S_ISREG(f2->mode) || !len2)
#  295|   			return 0;
#  296|   		return 1;

Error: COMPILER_WARNING (CWE-697): [#def3]
rsync-3.3.0-build/rsync-3.3.0/flist.c:298:13: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
#  298 |         if (!f2->basename || !S_ISREG(f2->mode) || !len2)
#      |             ^
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
#  808 |         const char basename[];  /* The basename (AKA filename) follows */
#      |                    ^~~~~~~~
#  296|   		return 1;
#  297|   	}
#  298|-> 	if (!f2->basename || !S_ISREG(f2->mode) || !len2)
#  299|   		return -1;
#  300|   

Error: COMPILER_WARNING (CWE-697): [#def4]
rsync-3.3.0-build/rsync-3.3.0/flist.c: scope_hint: In function ‘recv_file_list’
rsync-3.3.0-build/rsync-3.3.0/flist.c:2778:29: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘basename’ will never be NULL
# 2778 |                         if (fp->basename && S_ISREG(fp->mode) && F_LENGTH(fp))
#      |                             ^~
rsync-3.3.0-build/rsync-3.3.0/rsync.h:808:20: note: ‘basename’ declared here
#  808 |         const char basename[];  /* The basename (AKA filename) follows */
#      |                    ^~~~~~~~
# 2776|   		while (j-- > 0) {
# 2777|   			struct file_struct *fp = the_fattr_list.files[j];
# 2778|-> 			if (fp->basename && S_ISREG(fp->mode) && F_LENGTH(fp))
# 2779|   				break;
# 2780|   		}

Error: CLANG_WARNING: [#def5]
rsync-3.3.0-build/rsync-3.3.0/options.c:1480:4: warning[deadcode.DeadStores]: Value stored to 'argv' is never read
# 1478|   			} else if (poptDupArgv(argc, argv, argc_p, argv_p) != 0)
# 1479|   				out_of_memory("parse_arguments");
# 1480|-> 			argv = *argv_p;
# 1481|   			poptFreeContext(pc);
# 1482|   

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-66.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namersync-3.2.7-7.fc40
diffbase-store-results-to/tmp/tmp2ti34qop/rsync-3.2.7-7.fc40.tar.xz
diffbase-time-created2024-07-03 17:50:18
diffbase-time-finished2024-07-03 17:52:48
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp2ti34qop/rsync-3.2.7-7.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp2ti34qop/rsync-3.2.7-7.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-66.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namersync-3.3.0-2.fc41
store-results-to/tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.tar.xz
time-created2024-07-03 17:52:59
time-finished2024-07-03 17:55:04
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpeunxxshd/rsync-3.3.0-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9