Task #122297 - fixed.err

back to task #122297
download
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/disk-utils/fdformat.c:129:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc(track_size) + count’
#  127|   				}
#  128|   				for (count = 0; count < track_size; count++)
#  129|-> 					if (data[count] != FD_FILL_BYTE) {
#  130|   						if (retries_left) {
#  131|   							format_begin(ctrl);

Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.43.devel/disk-utils/mkswap.c:50: included_from: Included from here.
util-linux-2.43.devel/include/xalloc.h: scope_hint: In function ‘check_blocks’
util-linux-2.43.devel/include/xalloc.h:32:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((long unsigned int)*ctl.pagesize)’
util-linux-2.43.devel/include/optutils.h:8: included_from: Included from here.
util-linux-2.43.devel/disk-utils/mkswap.c:54: included_from: Included from here.
#   30|   	void *ret = malloc(size);
#   31|   
#   32|-> 	if (!ret && size)
#   33|   		err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
#   34|   	return ret;

Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.43.devel/misc-utils/blkid.c: scope_hint: In function ‘main’
util-linux-2.43.devel/misc-utils/blkid.c:886:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8)’
util-linux-2.43.devel/misc-utils/blkid.c:49: included_from: Included from here.
util-linux-2.43.devel/misc-utils/blkid.c:18: included_from: Included from here.
#  884|   				continue;
#  885|   
#  886|-> 			devices[numdev++] = dev;
#  887|   		}
#  888|