Task #129 - fixed.err

back to task #129
download
Error: GCC_ANALYZER_WARNING (CWE-401):
nilfs-utils-2.2.9/lib/gc.c: scope_hint: In function 'nilfs_toss_vdescs'
nilfs-utils-2.2.9/lib/gc.c:481:24: warning[-Wanalyzer-malloc-leak]: leak of 'ss'
nilfs-utils-2.2.9/include/nilfs.h:163:1: note: in expansion of macro 'NILFS_LOCK_FNS'
nilfs-utils-2.2.9/lib/gc.c: scope_hint: In function 'nilfs_toss_vdescs'
nilfs-utils-2.2.9/lib/gc.c: scope_hint: In function 'nilfs_toss_vdescs'
#  479|   	n = nilfs_get_snapshot(nilfs, &ss);
#  480|   	if (n < 0)
#  481|-> 		return n;
#  482|   
#  483|   	last_hit = 0;

Error: GCC_ANALYZER_WARNING (CWE-457):
nilfs-utils-2.2.9/lib/realpath.c: scope_hint: In function 'myrealpath'
nilfs-utils-2.2.9/lib/realpath.c:143:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'path'
#  141|   			}
#  142|   			memcpy(buf, link_path, n);
#  143|-> 			memcpy(buf + n, path, m + 1);
#  144|   			path = buf;
#  145|   #endif

Error: GCC_ANALYZER_WARNING (CWE-775):
nilfs-utils-2.2.9/sbin/cleanerd/cleanerd.c: scope_hint: In function ‘daemonize’
nilfs-utils-2.2.9/sbin/cleanerd/cleanerd.c:764:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
#  762|   		close(1);
#  763|   		close(2);
#  764|-> 		if (open(DEVNULL, O_RDONLY) < 0)
#  765|   			return -1;
#  766|   		if (open(DEVNULL, O_WRONLY) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775):
nilfs-utils-2.2.9/sbin/cleanerd/cleanerd.c:766:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  764|   		if (open(DEVNULL, O_RDONLY) < 0)
#  765|   			return -1;
#  766|-> 		if (open(DEVNULL, O_WRONLY) < 0)
#  767|   			return -1;
#  768|   		if (open(DEVNULL, O_WRONLY) < 0)

Error: GCC_ANALYZER_WARNING (CWE-775):
nilfs-utils-2.2.9/sbin/cleanerd/cleanerd.c:768:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 1)’
#  766|   		if (open(DEVNULL, O_WRONLY) < 0)
#  767|   			return -1;
#  768|-> 		if (open(DEVNULL, O_WRONLY) < 0)
#  769|   			return -1;
#  770|   	}

Error: CLANG_WARNING:
nilfs-utils-2.2.9/sbin/mkfs/mkfs.c:721:9: warning[core.NonNullParamChecker]: Null pointer passed to 3rd parameter expecting 'nonnull'
#  719|   	}
#  720|   
#  721|-> 	while (fgets(line, LINE_BUFFER_SIZE, fp) != NULL) {
#  722|   		if (strncmp(strtok(line, " "), device, strlen(device)) == 0) {
#  723|   			fclose(fp);