nilfs-utils-2.2.11-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/bin/dumpseg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/bin/lscp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/bin/lssu.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/bin/rmcp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:83: included_from: Included from here.
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c: scope_hint: In function ‘daemonize’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:768:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:768:21: note: in expansion of macro ‘unlikely’
#   11|   /* likely() and unlikely() macros */
#   12|   #define likely(x)	__builtin_expect(!!(x), 1)
#   13|-> #define unlikely(x)	__builtin_expect(!!(x), 0)
#   14|   
#   15|   #ifndef BUG

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:770:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:770:21: note: in expansion of macro ‘unlikely’
#   11|   /* likely() and unlikely() macros */
#   12|   #define likely(x)	__builtin_expect(!!(x), 1)
#   13|-> #define unlikely(x)	__builtin_expect(!!(x), 0)
#   14|   
#   15|   #ifndef BUG

Error: CPPCHECK_WARNING: [#def7]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/cleaner_ctl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def8]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/cleaner_ctl.c:355:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  353|   		mq_close(cleaner->recvq);
#  354|   		cleaner->recvq = -1;
#  355|-> 		mq_unlink(cleaner->recvq_name);
#  356|   		free(cleaner->recvq_name);
#  357|   	}

Error: CPPCHECK_WARNING: [#def9]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/cleaner_exec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/cnormap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/feature.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def13]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c:457:2: warning[deadcode.DeadStores]: Value stored to 'index' is never read
#  455|   	low = 0;
#  456|   	high = n - 1;
#  457|-> 	index = 0;
#  458|   	while (low <= high) {
#  459|   		index = (low + high) / 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c:502:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ss’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/include/nilfs.h:114:1: note: in expansion of macro ‘NILFS_LOCK_FNS’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
#  500|   	n = nilfs_get_snapshot(nilfs, &ss);
#  501|   	if (unlikely(n < 0))
#  502|-> 		return n;
#  503|   
#  504|   	last_hit = 0;

Error: CPPCHECK_WARNING: [#def15]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/ismounted.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/nilfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/nilfs.c:272:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  270|   	int ret;
#  271|   
#  272|-> 	ret = stat(nilfs->n_dev, &stbuf);
#  273|   	if (unlikely(ret < 0))
#  274|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def18]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/nilfs.c: scope_hint: In function ‘nilfs_open_sem’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/nilfs.c:272:15: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/nilfs.c:42: included_from: Included from here.
/usr/include/sys/stat.h:205:12: note: argument 1 of ‘stat’ must be non-null
#  270|   	int ret;
#  271|   
#  272|-> 	ret = stat(nilfs->n_dev, &stbuf);
#  273|   	if (unlikely(ret < 0))
#  274|   		return -1;

Error: CPPCHECK_WARNING: [#def19]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/realpath.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/realpath.c: scope_hint: In function ‘myrealpath’
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/realpath.c:136:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘path’
#  134|   			}
#  135|   			memcpy(buf, link_path, n);
#  136|-> 			memcpy(buf + n, path, m + 1);
#  137|   			path = buf;
#  138|   #endif

Error: CPPCHECK_WARNING: [#def21]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/lib/sb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def22]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cldconfig.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def23]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mkfs/mkfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def25]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mkfs/mkfs.c:885:2: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  883|   		cannot_allocate_memory();
#  884|   
#  885|-> 	memset(buffer, 0, bufsz);
#  886|   
#  887|   	if (lseek(fd, offset, SEEK_SET) < 0)

Error: CLANG_WARNING: [#def26]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mkfs/mkfs.c:885:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  883|   		cannot_allocate_memory();
#  884|   
#  885|-> 	memset(buffer, 0, bufsz);
#  886|   
#  887|   	if (lseek(fd, offset, SEEK_SET) < 0)

Error: CLANG_WARNING: [#def27]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mkfs/mkfs.c:1423:12: warning[deadcode.DeadStores]: Value stored to 'entry_block' during its initialization is never read
# 1421|   		blocksize / sizeof(struct nilfs_checkpoint);
# 1422|   	blocknr_t blocknr = fi->start;
# 1423|-> 	blocknr_t entry_block = blocknr;
# 1424|   	struct nilfs_cpfile_header *header;
# 1425|   	struct nilfs_checkpoint *cp;

Error: CLANG_WARNING: [#def28]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mkfs/mkfs.c:1482:12: warning[deadcode.DeadStores]: Value stored to 'entry_block' during its initialization is never read
# 1480|   		blocksize / sizeof(struct nilfs_segment_usage);
# 1481|   	blocknr_t blocknr = fi->start;
# 1482|-> 	blocknr_t entry_block = blocknr;
# 1483|   	struct nilfs_sufile_header *header;
# 1484|   	struct nilfs_segment_usage *su;

Error: CPPCHECK_WARNING: [#def29]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mount/mount_attrs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mount/mount_libmount.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def31]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mount/sundries.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def32]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mount/sundries.c:47:2: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#   45|   
#   46|   	t = xmalloc(n+1);
#   47|-> 	strncpy(t, s, n);
#   48|   	t[n] = 0;
#   49|   

Error: CPPCHECK_WARNING: [#def33]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/mount/umount_libmount.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def34]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/nilfs-resize/nilfs-resize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def35]
nilfs-utils-2.2.11-build/nilfs-utils-2.2.11/sbin/nilfs-tune/nilfs-tune.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-70.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namenilfs-utils-2.2.11-1.fc41
store-results-to/tmp/tmplsclp_gp/nilfs-utils-2.2.11-1.fc41.tar.xz
time-created2024-07-03 16:21:42
time-finished2024-07-03 16:22:53
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmplsclp_gp/nilfs-utils-2.2.11-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmplsclp_gp/nilfs-utils-2.2.11-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9