Task #129 - nilfs-utils-2.2.11-1.fc41/scan-results.err
back to task #129download
Error: GCC_ANALYZER_WARNING (CWE-775):
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c:83: included_from: Included from here.
nilfs-utils-2.2.11/sbin/cleanerd/cleanerd.c: scope_hint: In function ‘daemonize’
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/sbin/cleanerd/cleanerd.c:768:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
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):
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/sbin/cleanerd/cleanerd.c:770:21: note: in expansion of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
nilfs-utils-2.2.11/include/util.h:13:45: note: in definition of macro ‘unlikely’
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: CLANG_WARNING:
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: CLANG_WARNING:
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):
nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
nilfs-utils-2.2.11/lib/gc.c:502:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ss’
nilfs-utils-2.2.11/include/nilfs.h:114:1: note: in expansion of macro ‘NILFS_LOCK_FNS’
nilfs-utils-2.2.11/lib/gc.c: scope_hint: In function ‘nilfs_toss_vdescs’
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: CLANG_WARNING:
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):
nilfs-utils-2.2.11/lib/nilfs.c: scope_hint: In function ‘nilfs_open_sem’
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/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: GCC_ANALYZER_WARNING (CWE-457):
nilfs-utils-2.2.11/lib/realpath.c: scope_hint: In function ‘myrealpath’
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: CLANG_WARNING:
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:
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:
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:
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: CLANG_WARNING:
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|