device-mapper-multipath-0.9.9-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/bsd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/dasd.c: scope_hint: In function ‘read_dasd_pt’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/dasd.c:89:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_dasd’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/dasd.c:32: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/dasd.c: scope_hint: In function ‘read_dasd_pt’
#   87|   
#   88|   	if (fd < 0) {
#   89|-> 		return -1;
#   90|   	}
#   91|   

Error: CPPCHECK_WARNING: [#def3]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/gpt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def5]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:270:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
#  268|   			exit(1);
#  269|   
#  270|-> 		diskdevice = device;
#  271|   		what = ADD;
#  272|   	} else if (argc < 2) {

Error: CLANG_WARNING: [#def6]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:336:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
#  334|   	} else if (optind == argc-2) {
#  335|   		device = argv[optind];
#  336|-> 		diskdevice = argv[optind+1];
#  337|   	} else if (optind == argc-1) {
#  338|   		diskdevice = device = argv[optind];

Error: CLANG_WARNING: [#def7]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:338:3: warning[deadcode.DeadStores]: Value stored to 'diskdevice' is never read
#  336|   		diskdevice = argv[optind+1];
#  337|   	} else if (optind == argc-1) {
#  338|-> 		diskdevice = device = argv[optind];
#  339|   	} else {
#  340|   		usage();

Error: CLANG_WARNING: [#def8]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:371:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'diskdevice'
#  369|   		device = loopdev;
#  370|   
#  371|-> 		if (stat(device, &buf)) {
#  372|   			printf("failed to stat() %s\n", device);
#  373|   			exit (1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:417:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:31: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:32: included_from: Included from here.
#  415|   	int r = 0;
#  416|   
#  417|-> 	if (what == DELETE) {
#  418|   		r = dm_remove_partmaps(mapname, uuid, buf.st_rdev,
#  419|   				       verbose);

Error: CLANG_WARNING: [#def10]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:665:6: warning[unix.Malloc]: Potential leak of memory pointed to by 'delim'
#  663|   			break;
#  664|   	}
#  665|-> 	if (fd != -1)
#  666|   		close(fd);
#  667|   	if (what == LIST && loopcreated) {

Error: CLANG_WARNING: [#def11]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:692:2: warning[deadcode.DeadStores]: Value stored to 'out' is never read
#  690|   	off64_t in, out;
#  691|   	in = ((off64_t) secnr * secsz);
#  692|-> 	out = 1;
#  693|   
#  694|   	if ((out = lseek64(fd, in, SEEK_SET)) != in)

Error: CLANG_WARNING: [#def12]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/kpartx.c:694:7: warning[deadcode.DeadStores]: Although the value stored to 'out' is used in the enclosing expression, the value is never actually read from 'out'
#  692|   	out = 1;
#  693|   
#  694|-> 	if ((out = lseek64(fd, in, SEEK_SET)) != in)
#  695|   	{
#  696|   		fprintf(stderr, "llseek error\n");

Error: CPPCHECK_WARNING: [#def13]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/lopart.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def14]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/solaris.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/kpartx/unixware.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libdmmp/libdmmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathcmd/mpath_cmd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def18]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathpersist/mpath_persist_int.c:417:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  415|   	/* Free attribute and wait for the other threads */
#  416|   	pthread_attr_destroy(&attr);
#  417|-> 	rc = pthread_join(thread, NULL);
#  418|   
#  419|   	return (param.status);

Error: CLANG_WARNING: [#def19]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathpersist/mpath_persist_int.c:616:4: warning[deadcode.DeadStores]: Value stored to 'status' is never read
#  614|   					&pr_buff->prin_descriptor.prin_readfd.descriptors[i]->trnptid,
#  615|   					sizeof (struct transportid));
#  616|-> 			status = mpath_prout_common (mpp, MPATH_PROUT_REG_SA, 0, rq_type,
#  617|   					pamp, noisy);
#  618|   

Error: CLANG_WARNING: [#def20]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathpersist/mpath_pr_ioctl.c:303:14: warning[deadcode.DeadStores]: Although the value stored to 'jump' is used in the enclosing expression, the value is never actually read from 'jump'
#  301|   	unsigned int num;
#  302|   	int jump, k;
#  303|-> 	for (k = 0, jump = 24; k < length; k += jump, p += jump) {
#  304|   		fdesc->trnptid.format_code = ((p[0] >> 6) & 0x3);
#  305|   		fdesc->trnptid.protocol_id = (p[0] & 0xf);

Error: CPPCHECK_WARNING: [#def21]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/msort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c: scope_hint: In function ‘find_keyword’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:139:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:23: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
#  137|   	for (i = 0; i < VECTOR_SIZE(v); i++) {
#  138|   		keyword = VECTOR_SLOT(v, i);
#  139|-> 		if ((strlen(keyword->string) == len) &&
#  140|   		    !strcmp(keyword->string, name))
#  141|   			return keyword;

Error: CPPCHECK_WARNING: [#def23]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/uxsock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-122): [#def24]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.c: scope_hint: In function ‘vector_insert_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.c:86:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
#                                                       └─────────────────┘
#                                                                ^
#   84|   
#   85|   	for (i = VECTOR_SIZE(v) - 2; i >= slot; i--)
#   86|-> 		v->slot[i + 1] = v->slot[i];
#   87|   
#   88|   	v->slot[slot] = value;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def25]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.c: scope_hint: In function ‘vector_del_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.c:128:28: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
#  126|   		void *new_slot;
#  127|   
#  128|-> 		new_slot = realloc(v->slot, sizeof (void *) * v->allocated);
#  129|   		if (!new_slot)
#  130|   			v->allocated += VECTOR_DEFAULT_SIZE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c: scope_hint: In function ‘add_binding’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:201:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bdg’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:15: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:698:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:20: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
#  199|   	/* Check for exact match */
#  200|   	if (i >= 0 && cmp == 0)
#  201|-> 		return strcmp(bdg->wwid, wwid) ?
#  202|   			BINDING_CONFLICT : BINDING_EXISTS;
#  203|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:201:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bdg’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:857:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:865:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
#  199|   	/* Check for exact match */
#  200|   	if (i >= 0 && cmp == 0)
#  201|-> 		return strcmp(bdg->wwid, wwid) ?
#  202|   			BINDING_CONFLICT : BINDING_EXISTS;
#  203|   

Error: CLANG_WARNING: [#def28]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/alias.c:726:10: warning[deadcode.DeadStores]: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
#  724|   	}
#  725|   	pthread_cleanup_push(cleanup_free_ptr, &line);
#  726|-> 	while ((n = getline(&line, &line_len, file)) >= 0) {
#  727|   		char *alias, *wwid;
#  728|   		const char *mpe_wwid;

Error: CPPCHECK_WARNING: [#def29]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers/directio.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def31]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers/emc_clariion.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def32]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers/hp_sw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def33]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers/tur.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def34]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/discovery.c:1299:2: warning[deadcode.DeadStores]: Value stored to 'len' is never read
# 1297|   			__func__, d - in, in_len);
# 1298|   
# 1299|-> 	len = 0;
# 1300|   	vpd_type = vpd[1] & 0xf;
# 1301|   	vpd_len = vpd[3];

Error: CLANG_WARNING: [#def35]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/discovery.c:2124:2: warning[deadcode.DeadStores]: Value stored to 'p' is never read
# 2122|   		return 0;
# 2123|   
# 2124|-> 	p = skip_zeroes_backward(mangled, &len, p);
# 2125|   	if (len >= size)
# 2126|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def36]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘merge_words’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:31:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
#   29|   	*dst = realloc(*dst, len);
#   30|   
#   31|-> 	if (!*dst) {
#   32|   		free(p);
#   33|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:436:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:12: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
#  434|   		switch (*word) {
#  435|   		case 'D':
#  436|-> 			pgp->status = PGSTATE_DISABLED;
#  437|   			break;
#  438|   		case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:439:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
#  437|   			break;
#  438|   		case 'A':
#  439|-> 			pgp->status = PGSTATE_ACTIVE;
#  440|   			break;
#  441|   		case 'E':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:442:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
#  440|   			break;
#  441|   		case 'E':
#  442|-> 			pgp->status = PGSTATE_ENABLED;
#  443|   			break;
#  444|   		default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:445:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
#  443|   			break;
#  444|   		default:
#  445|-> 			pgp->status = PGSTATE_UNDEF;
#  446|   			break;
#  447|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:501:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
#  499|   			switch (*word) {
#  500|   			case 'F':
#  501|-> 				pp->dmstate = PSTATE_FAILED;
#  502|   				break;
#  503|   			case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:504:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
#  502|   				break;
#  503|   			case 'A':
#  504|-> 				pp->dmstate = PSTATE_ACTIVE;
#  505|   				break;
#  506|   			default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:518:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
#  516|   				return 1;
#  517|   
#  518|-> 			pp->failcount = atoi(word);
#  519|   			free(word);
#  520|   

Error: CPPCHECK_WARNING: [#def44]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_path_by_syspath’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:494:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:33: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:32: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:36: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:491:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:492:42: note: in expansion of macro ‘nvme_pg_to_path’
#  492|   		struct nvme_path *path = nvme_pg_to_path(pg);
#  493|   
#  494|-> 		psyspath = udev_device_get_syspath(path->udev);
#  495|   		if (psyspath && !strcmp(ppath, psyspath))
#  496|   			return path;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_controllers’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:646:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:644:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:645:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:645:24: note: in expansion of macro ‘nvme_pg_to_path’
#  644|   	vector_foreach_slot(&map->pgvec, pg, i) {
#  645|   		path = nvme_pg_to_path(pg);
#  646|-> 		path->seen = false;
#  647|   	}
#  648|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:755:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:753:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:754:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/foreign/nvme.c:754:24: note: in expansion of macro ‘nvme_pg_to_path’
#  753|   	vector_foreach_slot_backwards(&map->pgvec, pg, i) {
#  754|   		path = nvme_pg_to_path(pg);
#  755|-> 		if (!path->seen) {
#  756|   			condlog(1, "path %d not found in %s any more",
#  757|   				i, udev_device_get_sysname(map->udev));

Error: GCC_ANALYZER_WARNING (CWE-126): [#def48]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:47: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:26:40: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:54:26: note: in definition of macro ‘LIST_HEAD’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:28: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:40: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:26:40: note: read of 8 bytes from after the end of ‘uevlisten_tmp’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
#                                              └──────────────────────────────────────┘
#                                                                 ^
#   24|   
#   25|   #define container_of(ptr, type, member) ({		\
#   26|-> 	typeof( ((type *)0)->member ) *__mptr = (ptr);	\
#   27|   	(type *)( (char *)__mptr - offsetof(type,member) );})
#   28|   

Error: CLANG_WARNING: [#def49]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:12: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/structs.h:9: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/prio.h:7: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers.h:5: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:123:13: warning[unix.Malloc]: Use of memory after it is freed
#  121|   static inline void list_del(struct list_head *entry)
#  122|   {
#  123|-> 	__list_del(entry->prev, entry->next);
#  124|   	entry->next = LIST_POISON1;
#  125|   	entry->prev = LIST_POISON2;

Error: CPPCHECK_WARNING (CWE-758): [#def50]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/nvme-ioctl.c:572: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  570|   		     bool save, __u32 data_len, void *data, __u32 *result)
#  571|   {
#  572|-> 	__u32 cdw10 = fid | (save ? 1 << 31 : 0);
#  573|   
#  574|   	return nvme_feature(fd, nvme_admin_set_features, nsid, cdw10, value,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c: scope_hint: In function ‘prios_match’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:185:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:11: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
#  183|   prios_match(struct path *pp1, struct path *pp2)
#  184|   {
#  185|-> 	return (pp1->priority == pp2->priority);
#  186|   }
#  187|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:185:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
#  183|   prios_match(struct path *pp1, struct path *pp2)
#  184|   {
#  185|-> 	return (pp1->priority == pp2->priority);
#  186|   }
#  187|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c: scope_hint: In function ‘tpg_match’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:191:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
#  189|   tpg_match(struct path *pp1, struct path *pp2)
#  190|   {
#  191|-> 	return (pp1->tpg_id == pp2->tpg_id);
#  192|   }
#  193|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:191:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
#  189|   tpg_match(struct path *pp1, struct path *pp2)
#  190|   {
#  191|-> 	return (pp1->tpg_id == pp2->tpg_id);
#  192|   }
#  193|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c: scope_hint: In function ‘_print_multipath_topology’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c:926:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_path_layout()’
#  924|   
#  925|   fieldwidth_t *alloc_path_layout(void) {
#  926|-> 	return calloc(ARRAY_SIZE(pd), sizeof(fieldwidth_t));
#  927|   }
#  928|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c: scope_hint: In function ‘_snprint_multipath_topology’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c:983:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_multipath_layout()’
#  981|   fieldwidth_t *alloc_multipath_layout(void) {
#  982|   
#  983|-> 	return calloc(ARRAY_SIZE(mpd), sizeof(fieldwidth_t));
#  984|   }
#  985|   

Error: CLANG_WARNING: [#def57]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c:1257:15: warning[unix.Malloc]: Potential leak of memory pointed to by 'p_width'
# 1255|   
# 1256|   	_snprint_multipath_topology(gmp, &buff, verbosity, p_width);
# 1257|-> 	printf("%s", get_strbuf_str(&buff));
# 1258|   }
# 1259|   

Error: CLANG_WARNING: [#def58]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/print.c:1293:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'width'
# 1291|   
# 1292|   	if (verbosity == 1)
# 1293|-> 		return _snprint_multipath(gmp, buff, "%n", width);
# 1294|   
# 1295|   	if(isatty(1) &&

Error: GCC_ANALYZER_WARNING (CWE-688): [#def59]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/prioritizers/iet.c: scope_hint: In function ‘iet_prio’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/prioritizers/iet.c:106:39: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir(&fullpath)’ where non-null expected
/usr/include/features.h:511: included_from: Included from here.
/usr/include/dirent.h:25: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/prioritizers/iet.c:1: included_from: Included from here.
/usr/include/dirent.h:167:23: note: argument 1 of ‘readdir’ must be non-null
#  104|   
#  105|   	// loop to find device in /dev/disk/by-path
#  106|-> 	while( NULL != (dir_entry_p = readdir(dir_p))) {
#  107|   		if (dir_entry_p->d_name[0] != '.') {
#  108|   			char path[BUFFERSIZE] = "/dev/disk/by-path/";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/sysfs.c: scope_hint: In function ‘sysfs_is_multipathed’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/sysfs.c:309:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 0)’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/sysfs.c:38: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/sysfs.c:305:21: note: in expansion of macro ‘safe_snprintf’
#  307|   			continue;
#  308|   
#  309|-> 		fd = open(pathbuf, O_RDONLY);
#  310|   		if (fd == -1) {
#  311|   			condlog(1, "%s: error opening %s", __func__, pathbuf);

Error: CLANG_WARNING: [#def61]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:376:2: warning[unix.Malloc]: Use of memory after it is freed
#  374|   	struct uevent *earlier, *tmp;
#  375|   
#  376|-> 	list_for_some_entry_reverse_safe(earlier, tmp, &later->node, &st->uevq, node) {
#  377|   		/*
#  378|   		 * filter unnecessary earlier uevents

Error: CLANG_WARNING: [#def62]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:410:2: warning[unix.Malloc]: Use of memory after it is freed
#  408|   	struct uevent *earlier, *tmp;
#  409|   
#  410|-> 	list_for_some_entry_reverse_safe(earlier, tmp, &later->node, &st->uevq, node) {
#  411|   		if (merge_need_stop(earlier, later))
#  412|   			break;

Error: CLANG_WARNING: [#def63]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:440:3: warning[unix.Malloc]: Use of memory after it is freed
#  438|   
#  439|   	list_for_some_entry_reverse(later, &st->uevq, st->old_tail, node)
#  440|-> 		uevent_filter(later, st);
#  441|   
#  442|   	if(uevent_need_merge(st->conf))

Error: CLANG_WARNING: [#def64]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/uevent.c:444:4: warning[unix.Malloc]: Use of memory after it is freed
#  442|   	if(uevent_need_merge(st->conf))
#  443|   		list_for_some_entry_reverse(later, &st->uevq, st->old_tail, node)
#  444|-> 			uevent_merge(later, st);
#  445|   }
#  446|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c: scope_hint: In function ‘check_mountinfo’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:208:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:26: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/util.h:45:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/util.h:38:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:23: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:129:13: note: in expansion of macro ‘VECTOR_SIZE’
#  206|   		pthread_cleanup_push(cleanup_cache, cache);
#  207|   		if (mnt_table_set_cache(tbl, cache) == 0) {
#  208|-> 			stream = fopen(mountinfo, "r");
#  209|   			if (stream != NULL) {
#  210|   				pthread_cleanup_push(cleanup_fclose, stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:208:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/util.h:45:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/util.h:38:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/valid.c:129:13: note: in expansion of macro ‘VECTOR_SIZE’
#  206|   		pthread_cleanup_push(cleanup_cache, cache);
#  207|   		if (mnt_table_set_cache(tbl, cache) == 0) {
#  208|-> 			stream = fopen(mountinfo, "r");
#  209|   			if (stream != NULL) {
#  210|   				pthread_cleanup_push(cleanup_fclose, stream);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def67]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_clean_els_marginal_list’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:503:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘els_marginal_list_head.next + -2056’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/checkers.h:5: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/prio.h:7: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/structs.h:9: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:12: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:500:29: note: in expansion of macro ‘list_first_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:500:29: note: in expansion of macro ‘list_first_entry’
#  501|   					     node);
#  502|   		list_del(&els_marg->node);
#  503|-> 		free(els_marg);
#  504|   	}
#  505|   }

Error: GCC_ANALYZER_WARNING: [#def68]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_fabric_notification_receiver’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/fpin_handlers.c:619:23: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
#  617|   
#  618|   		condlog(4, "Waiting for ELS...\n");
#  619|-> 		ret = read(fd, buf, DEF_RX_BUF_SIZE);
#  620|   		if (ret < 0) {
#  621|   			condlog(0, "failed to read the els frame (%d)", ret);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c: scope_hint: In function ‘reconfigure_check_uid_attrs’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3009:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:56: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3023:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/parser.h:35: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:42: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3003:13: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3003:39: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3006:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3007:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3007:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3007:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3007:29: note: in expansion of macro ‘VECTOR_SLOT’
/usr/include/libdevmapper.h:30: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:10: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
# 3007|   		char *new = VECTOR_SLOT(new_attrs, i);
# 3008|   
# 3009|-> 		if (strcmp(old, new))
# 3010|   			return true;
# 3011|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c: scope_hint: In function ‘daemonize’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3689:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
# 3687|   		fprintf(stderr, "cannot chdir to '/', continuing\n");
# 3688|   
# 3689|-> 	dev_null_fd = open("/dev/null", O_RDWR);
# 3690|   	if (dev_null_fd < 0){
# 3691|   		fprintf(stderr, "cannot open /dev/null for input & output : %s\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3696:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
# 3694|   	}
# 3695|   
# 3696|-> 	if (dup2(dev_null_fd, STDIN_FILENO) < 0) {
# 3697|   		fprintf(stderr, "cannot dup2 /dev/null to stdin : %s\n",
# 3698|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3701:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
# 3699|   		_exit(0);
# 3700|   	}
# 3701|-> 	if (dup2(dev_null_fd, STDOUT_FILENO) < 0) {
# 3702|   		fprintf(stderr, "cannot dup2 /dev/null to stdout : %s\n",
# 3703|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3706:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
# 3704|   		_exit(0);
# 3705|   	}
# 3706|-> 	if (dup2(dev_null_fd, STDERR_FILENO) < 0) {
# 3707|   		fprintf(stderr, "cannot dup /dev/null to stderr : %s\n",
# 3708|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c: scope_hint: In function ‘daemonize’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3713:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
# 3711|   	daemon_pid = getpid();
# 3712|   	return 0;
# 3713|-> }
# 3714|   
# 3715|   int

Error: CLANG_WARNING: [#def75]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3817:4: warning[deadcode.DeadStores]: Value stored to 'c' is never read
# 3815|   				}
# 3816|   			}
# 3817|-> 			c += snprintf(c, s + CMDSIZE - c, "\n");
# 3818|   		}
# 3819|   		if (!s) {

Error: CLANG_WARNING: [#def76]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/main.c:3964:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 3962|   	}
# 3963|   	pthread_attr_destroy(&attr);
# 3964|-> 	rc = pthread_join(thread, NULL);
# 3965|   	return 0;
# 3966|   

Error: CPPCHECK_WARNING: [#def77]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c: scope_hint: In function ‘key_generator’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c:97:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c:14: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c:92:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/multipathc.c:92:30: note: in expansion of macro ‘VECTOR_SLOT’
#   95|   			 * parameter, not the keyword. Don't delete it.
#   96|   			 */
#   97|-> 			if (!kw->param) {
#   98|   				free_key(kw);
#   99|   				vector_del_slot(v, VECTOR_SIZE(v) - 1);

Error: CLANG_WARNING: [#def79]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/uxlsnr.c:340:2: warning[core.NullDereference]: Dereference of null pointer
#  338|   	struct client *c;
#  339|   
#  340|-> 	list_for_each_entry(c, &clients, node) {
#  341|   		if (c != skip && c->state == CLT_LOCKED_WORK) {
#  342|   			clients_need_lock = true;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/uxlsnr.c: scope_hint: In function ‘client_state_machine’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/uxlsnr.c:513:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/multipathd/uxlsnr.c:30: included_from: Included from here.
device-mapper-multipath-0.9.9-build/multipath-tools-0.9.9/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
#  511|   			struct key *kw = VECTOR_SLOT(c->cmdvec, 0);
#  512|   
#  513|-> 			if (!c->is_root && kw->code != VRB_LIST) {
#  514|   				c->error = -EPERM;
#  515|   				condlog(0, "%s: cli[%d]: unauthorized cmd \"%s\"",

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-13.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namedevice-mapper-multipath-0.9.9-1.fc41
store-results-to/tmp/tmpxkfi526u/device-mapper-multipath-0.9.9-1.fc41.tar.xz
time-created2024-07-03 12:22:32
time-finished2024-07-03 12:24:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpxkfi526u/device-mapper-multipath-0.9.9-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpxkfi526u/device-mapper-multipath-0.9.9-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9