Task #901 - added.err

back to task #901
download
Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c: scope_hint: In function ‘_daemonize’
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
# 2004|   		exit(EXIT_DESC_OPEN_FAILURE);
# 2005|   
# 2006|-> 	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|   	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2004|   		exit(EXIT_DESC_OPEN_FAILURE);
# 2005|   
# 2006|-> 	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|   	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
# 2004|   		exit(EXIT_DESC_OPEN_FAILURE);
# 2005|   
# 2006|-> 	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|   	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2006:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2004|   		exit(EXIT_DESC_OPEN_FAILURE);
# 2005|   
# 2006|-> 	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|   	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2007:50: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
# 2005|   
# 2006|   	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|-> 	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))
# 2009|   		exit(EXIT_DESC_OPEN_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2007:50: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2005|   
# 2006|   	if ((dup2(null_fd, STDIN_FILENO) == -1) ||
# 2007|-> 	    (dup2(null_fd, STDOUT_FILENO) == -1) ||
# 2008|   	    (dup2(null_fd, STDERR_FILENO) == -1))
# 2009|   		exit(EXIT_DESC_OPEN_FAILURE);

Error: GCC_ANALYZER_WARNING (CWE-775):
lvm2-2.03.24-build/LVM2.2.03.24/daemons/dmeventd/dmeventd.c:2011:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 2009|   		exit(EXIT_DESC_OPEN_FAILURE);
# 2010|   
# 2011|-> 	if ((null_fd > STDERR_FILENO) && close(null_fd))
# 2012|   		exit(EXIT_DESC_CLOSE_FAILURE);
# 2013|   

Error: CLANG_WARNING:
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:1954:6: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1952|   static void _text_destroy(struct format_type *fmt)
# 1953|   {
# 1954|-> 	if (fmt->orphan_vg)
# 1955|   		free_orphan_vg(fmt->orphan_vg);
# 1956|   

Error: GCC_ANALYZER_WARNING (CWE-457):
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c: scope_hint: In function ‘_text_destroy’
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:1954:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*fmt.orphan_vg’
lvm2-2.03.24-build/LVM2.2.03.24/lib/misc/lib.h:30: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:16: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/lib/log/log.h:105:23: note: in expansion of macro ‘LOG_LINE_WITH_ERRNO’
lvm2-2.03.24-build/LVM2.2.03.24/lib/log/log.h:115:28: note: in expansion of macro ‘log_err’
lvm2-2.03.24-build/LVM2.2.03.24/lib/format_text/format-text.c:2622:17: note: in expansion of macro ‘log_error’
# 1952|   static void _text_destroy(struct format_type *fmt)
# 1953|   {
# 1954|-> 	if (fmt->orphan_vg)
# 1955|   		free_orphan_vg(fmt->orphan_vg);
# 1956|   

Error: GCC_ANALYZER_WARNING (CWE-126):
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c: scope_hint: In function ‘_print_val_man’
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:218:29: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:110: included_from: Included from here.
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:218:29: note: read of 1 byte from after the end of the region
#                                                       └─────────────────┘
#                                                                ^
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:17: included_from: Included from here.
/usr/include/string.h:350:14: note: argument 1 of ‘strstr’ must be a pointer to a null-terminated string
#  216|   			}
#  217|   
#  218|-> 			if (strstr(line_argv[i], "Number"))
#  219|   				printf("\\fI%s\\fP", line_argv[i]);
#  220|   			else

Error: CLANG_WARNING:
lvm2-2.03.24-build/LVM2.2.03.24/tools/man-generator.c:375:5: warning[deadcode.DeadStores]: Value stored to 'need_ro_indent_end' is never read
#  373|   			if ((cmd->ro_count > 2) && (sep == 2)) {
#  374|   				printf("\n.RS 5\n");
#  375|-> 				need_ro_indent_end = 1;
#  376|   			}
#  377|   

Error: CLANG_WARNING:
lvm2-2.03.24-build/LVM2.2.03.24/tools/toollib.c:2927:9: warning[deadcode.DeadStores]: Although the value stored to 'type' is used in the enclosing expression, the value is never actually read from 'type'
# 2925|   			continue;
# 2926|   
# 2927|-> 		if (!(type = get_lv_type(lvt_enum)))
# 2928|   			continue;
# 2929|   

Error: CLANG_WARNING:
lvm2-2.03.24-build/LVM2.2.03.24/tools/toollib.c:2973:9: warning[deadcode.DeadStores]: Although the value stored to 'prop' is used in the enclosing expression, the value is never actually read from 'prop'
# 2971|   			continue;
# 2972|   
# 2973|-> 		if (!(prop = get_lv_prop(lvp_enum)))
# 2974|   			continue;
# 2975|   

Error: GCC_ANALYZER_WARNING (CWE-401):
lvm2-2.03.24-build/LVM2.2.03.24/tools/vgcfgbackup.c: scope_hint: In function ‘_vg_backup_single’
lvm2-2.03.24-build/LVM2.2.03.24/tools/vgcfgbackup.c:68:20: warning[-Wanalyzer-malloc-leak]: leak of ‘_expand_filename(arg_value(cmd, 195), *vg.name,  last_filename)’
#   66|   			return_ECMD_FAILED;
#   67|   
#   68|-> 		if (!backup_to_file(filename, vg->cmd->cmd_line, vg))
#   69|   			return_ECMD_FAILED;
#   70|   	} else {