device-mapper-multipath-0.10.0-2.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/usr/lib/udev/kpartx_id:28:18: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   26|   UUID=$3
#   27|   
#   28|-> if [ -z "$MAJOR" -o -z "$MINOR" ]; then
#   29|       echo "usage: $0 major minor UUID"
#   30|       exit 1;

Error: SHELLCHECK_WARNING (CWE-477): [#def2]
/usr/sbin/mpathconf:79:18: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   77|   {
#   78|   	shift 3
#   79|-> 	while [ -n "$1" -a -n "$2" ]; do
#   80|   		MAJOR=$(echo $1 | tr -d '(,')
#   81|   		MINOR=$(echo $2 | tr -d ')')

Error: SHELLCHECK_WARNING (CWE-156): [#def3]
/usr/sbin/mpathconf:97:15: warning[SC2046]: Quote this to prevent word splitting.
#   95|   		add_wwid "${1##mpath-}"
#   96|   	else
#   97|-> 		get_dm_deps `dmsetup deps -u $1`
#   98|   	fi
#   99|   }

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/sbin/mpathconf:236:45: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/sbin/mpathconf:236:59: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def6]
/usr/sbin/mpathconf:236:77: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/usr/sbin/mpathconf:236:93: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/sbin/mpathconf:236:110: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def9]
/usr/sbin/mpathconf:236:131: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def10]
/usr/sbin/mpathconf:247:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  245|   		RECHECK_WWID=""
#  246|   	fi
#  247|-> 	if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then
#  248|   		echo "--user_friendly_names must be either 'y' or 'n'"
#  249|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def11]
/usr/sbin/mpathconf:251:56: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  249|   		exit 1
#  250|   	fi
#  251|-> 	if [ -n "$RECHECK_WWID" ] && [ "$RECHECK_WWID" != "y" -a "$RECHECK_WWID" != "n" ]; then
#  252|   		echo "--recheck_wwid must be either 'y' or 'n'"
#  253|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def12]
/usr/sbin/mpathconf:259:43: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def13]
/usr/sbin/mpathconf:259:63: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def14]
/usr/sbin/mpathconf:259:83: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def15]
/usr/sbin/mpathconf:259:102: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def16]
/usr/sbin/mpathconf:259:125: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def17]
/usr/sbin/mpathconf:259:148: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def18]
/usr/sbin/mpathconf:263:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  261|   		exit 1
#  262|   	fi
#  263|-> 	if [ -n "$PROPERTY" ] && [ "$PROPERTY" != "y" -a "$PROPERTY" != "n" ]; then
#  264|   		echo "--property_blacklist must be either 'y' or 'n'"
#  265|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def19]
/usr/sbin/mpathconf:267:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  265|   		exit 1
#  266|   	fi
#  267|-> 	if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "y" -a "$FOREIGN" != "n" ]; then
#  268|   		echo "--enable_foreign must be either 'y' or 'n'"
#  269|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def20]
/usr/sbin/mpathconf:283:20: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def21]
/usr/sbin/mpathconf:283:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def22]
/usr/sbin/mpathconf:283:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def23]
/usr/sbin/mpathconf:283:70: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def24]
/usr/sbin/mpathconf:283:87: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def25]
/usr/sbin/mpathconf:283:108: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def26]
/usr/sbin/mpathconf:286:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  284|   		SHOW_STATUS=1
#  285|   	fi
#  286|-> 	if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then
#  287|   		echo "--with_module must be either 'y' or 'n'"
#  288|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def27]
/usr/sbin/mpathconf:290:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  288|   		exit 1
#  289|   	fi
#  290|-> 	if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then
#  291|   		echo "--with_multipathd must be either 'y' or 'n'"
#  292|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def28]
/usr/sbin/mpathconf:294:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  292|   		exit 1
#  293|   	fi
#  294|-> 	if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then
#  295|   		echo "Because --allow makes changes that cannot be automatically reversed,"
#  296|   		echo "you must set --outfile when you set --allow"

Error: SHELLCHECK_WARNING (CWE-477): [#def29]
/usr/sbin/mpathconf:341:19: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  339|   fi
#  340|   
#  341|-> if [ -z "$MODULE" -o "$MODULE" = "y" ]; then
#  342|   	if lsmod | grep -q "dm_multipath" ; then
#  343|   		HAVE_MODULE=1

Error: SHELLCHECK_WARNING (CWE-477): [#def30]
/usr/sbin/mpathconf:419:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  417|   
#  418|   if [ -n "$SHOW_STATUS" ]; then
#  419|-> 	if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then
#  420|   		echo "multipath is enabled"
#  421|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def31]
/usr/sbin/mpathconf:429:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  427|   		echo "find_multipaths is $HAVE_FIND"
#  428|   	fi
#  429|-> 	if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then
#  430|   		echo "user_friendly_names is disabled"
#  431|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def32]
/usr/sbin/mpathconf:434:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  432|   		echo "user_friendly_names is enabled"
#  433|   	fi
#  434|-> 	if [ -z "$HAVE_RECHECK_WWID" -o "$HAVE_RECHECK_WWID" = 0 ]; then
#  435|   		echo "recheck_wwid is disabled"
#  436|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def33]
/usr/sbin/mpathconf:439:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  437|   		echo "recheck_wwid is enabled"
#  438|   	fi
#  439|-> 	if [ -z "$HAVE_PROPERTY" -o "$HAVE_PROPERTY" = 0 ]; then
#  440|   		echo "default property blacklist is disabled"
#  441|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def34]
/usr/sbin/mpathconf:444:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  442|   		echo "default property blacklist is enabled"
#  443|   	fi
#  444|-> 	if [ -z "$HAVE_FOREIGN" -o "$HAVE_FOREIGN" = 0 ]; then
#  445|   		echo "enable_foreign is not set (no foreign multipath devices will be shown)"
#  446|   	elif [ "$HAVE_FOREIGN" = 1 ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def35]
/usr/sbin/mpathconf:578:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  576|   	fi
#  577|   elif [ "$PROPERTY" = "y" ]; then
#  578|-> 	if [ -z "$HAVE_PROPERTY" -a -z "$HAVE_EXCEPTIONS" ]; then
#  579|   		cat >> $TMPFILE << _EOF_
#  580|   

Error: SHELLCHECK_WARNING (CWE-477): [#def36]
/usr/sbin/mpathconf:598:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  596|   
#  597|   if [ "$FOREIGN" = "n" ]; then
#  598|-> 	if [ "$HAVE_FOREIGN" = 1 -o "$HAVE_FOREIGN" = 3 ]; then
#  599|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*enable_foreign/#	enable_foreign/' $TMPFILE
#  600|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def37]
/usr/sbin/mpathconf:608:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def38]
/usr/sbin/mpathconf:608:52: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def39]
/usr/sbin/mpathconf:614:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  612|   fi
#  613|   
#  614|-> if [ -n "$OPTION_NAME" -a -n "$OPTION_VALUE" ]; then
#  615|   	if [ -z "$HAVE_OPTION" ]; then
#  616|   		sed -i '/^defaults[[:space:]]*{/ a\

Error: SHELLCHECK_WARNING (CWE-477): [#def40]
/usr/sbin/mpathconf:624:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  622|   		CHANGED_CONFIG=1
#  623|   	fi
#  624|-> elif [ -n "$OPTION_NAME" -a -n "$HAVE_OPTION" ]; then
#  625|   	sed -i '/^defaults[[:space:]]*{/,/^}/{/^[[:space:]]*'"$OPTION_NAME"'\([[:space:]].*\)\?$/d}' $TMPFILE
#  626|   	CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def41]
/usr/sbin/mpathconf:656:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  654|   		systemctl stop multipathd.service
#  655|   	fi
#  656|-> elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
#  657|   	systemctl reload multipathd.service
#  658|   fi

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/kpartx/kpartx.c:417:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/kpartx/kpartx.c:31: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/kpartx/kpartx.c: scope_hint: In function ‘main’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: GCC_ANALYZER_WARNING (CWE-401): [#def44]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c: scope_hint: In function ‘mpath_prout_rel’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:635:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:14: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:70:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:71:17: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:21: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:539:9: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:539:9: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:70:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:71:17: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:81:25: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/byteorder.h:6: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/structs.h:10: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:17: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/byteorder.h:40:21: note: in expansion of macro ‘be64_to_cpu’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:574:13: note: in expansion of macro ‘get_be64’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:435:9: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:583:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathpersist/mpath_persist_int.c:583:17: note: in expansion of macro ‘condlog’
#  633|   	free(pptr);
#  634|   out1:
#  635|-> 	free (pamp);
#  636|   out:
#  637|   	free (pr_buff);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c: scope_hint: In function ‘find_keyword’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c:139:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘keyword’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c:23: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.c:138:27: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: GCC_ANALYZER_WARNING (CWE-122): [#def46]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.c: scope_hint: In function ‘vector_insert_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def47]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.c: scope_hint: In function ‘vector_del_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def48]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c: scope_hint: In function ‘add_binding’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:201:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bdg’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:15: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:703:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:20: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def49]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:201:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bdg’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:862:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:862:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:862:19: note: in expansion of macro ‘vector_convert’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:870:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:870:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:870:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:45:18: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/alias.c:194:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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-465): [#def50]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘merge_words’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def51]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:436:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:12: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def52]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:439:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def53]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:442:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def54]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:445:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def55]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:501:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def56]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:504:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def57]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:518:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:425:23: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c:485:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:29: note: in definition of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/dmparser.c: scope_hint: In function ‘disassemble_status’
#  516|   				return 1;
#  517|   
#  518|-> 			pp->failcount = atoi(word);
#  519|   			free(word);
#  520|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_path_by_syspath’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:494:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:33: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:32: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:36: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:680:21: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:687:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:491:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def59]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c: scope_hint: In function ‘_find_controllers’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:646:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:644:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:645:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def60]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:755:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:899:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:753:9: note: in expansion of macro ‘vector_foreach_slot_backwards’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:754:24: note: in expansion of macro ‘nvme_pg_to_path’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/foreign/nvme.c:84:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def61]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:47: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:26:40: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:54:26: note: in definition of macro ‘LIST_HEAD’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:28: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:40: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c: scope_hint: In function ‘uevq_cleanup’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/uevent.c:122:9: note: in expansion of macro ‘list_for_each_entry_safe’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:26:40: note: read of 8 bytes from after the end of ‘uevlisten_tmp’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:348:20: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: CPPCHECK_WARNING (CWE-758): [#def62]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def63]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c: scope_hint: In function ‘prios_match’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:185:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:11: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def64]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:185:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def65]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c: scope_hint: In function ‘tpg_match’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:191:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def66]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:191:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:214:22: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:231:37: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/pgpolicies.c:236:31: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def67]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/print.c: scope_hint: In function ‘print_multipath_topology__’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/print.c:920:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_path_layout()’
#  918|   
#  919|   fieldwidth_t *alloc_path_layout(void) {
#  920|-> 	return calloc(ARRAY_SIZE(pd), sizeof(fieldwidth_t));
#  921|   }
#  922|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/print.c: scope_hint: In function ‘snprint_multipath_topology__’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/print.c:977:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_multipath_layout()’
#  975|   fieldwidth_t *alloc_multipath_layout(void) {
#  976|   
#  977|-> 	return calloc(ARRAY_SIZE(mpd), sizeof(fieldwidth_t));
#  978|   }
#  979|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/prioritizers/iet.c: scope_hint: In function ‘iet_prio’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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.10.0-build/multipath-tools-0.10.0/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): [#def70]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/sysfs.c: scope_hint: In function ‘sysfs_is_multipathed’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/sysfs.c:309:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 0)’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/sysfs.c:38: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: GCC_ANALYZER_WARNING (CWE-775): [#def71]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c: scope_hint: In function ‘check_mountinfo’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:208:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:26: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/util.h:54:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/util.h:47:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:23: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def72]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:208:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&mountinfo, "r")’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/util.h:54:34: note: in definition of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/util.h:47:9: note: in expansion of macro ‘safe_snprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/valid.c:308:13: note: in expansion of macro ‘safe_sprintf’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def73]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_clean_els_marginal_list’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c:503:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘els_marginal_list_head.next + -2056’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/checkers.h:5: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/prio.h:7: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/structs.h:9: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c:12: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c:500:29: note: in expansion of macro ‘list_first_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmultipath/list.h:247:9: note: in expansion of macro ‘container_of’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c:37:9: note: in expansion of macro ‘list_entry’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: [#def74]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/fpin_handlers.c: scope_hint: In function ‘fpin_fabric_notification_receiver’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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): [#def75]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c: scope_hint: In function ‘reconfigure_check_uid_attrs’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3155:21: warning[-Wanalyzer-null-argument]: use of NULL ‘new’ where non-null expected
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:56: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3169:17: note: in expansion of macro ‘condlog’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/parser.h:35: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:42: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3149:13: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3149:39: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3152:9: note: in expansion of macro ‘vector_foreach_slot’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3153:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3153:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/libmpathutil/vector.h:37:41: note: in expansion of macro ‘VECTOR_SIZE’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3153:29: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3153:29: note: in expansion of macro ‘VECTOR_SLOT’
/usr/include/libdevmapper.h:30: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:10: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
# 3153|   		char *new = VECTOR_SLOT(new_attrs, i);
# 3154|   
# 3155|-> 		if (strcmp(old, new))
# 3156|   			return true;
# 3157|   	}

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

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c: scope_hint: In function ‘daemonize’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/main.c:3859:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
# 3857|   	daemon_pid = getpid();
# 3858|   	return 0;
# 3859|-> }
# 3860|   
# 3861|   int

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/multipathc.c: scope_hint: In function ‘key_generator’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/multipathc.c:97:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/multipathc.c:14: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/multipathc.c:92:30: note: in expansion of macro ‘VECTOR_SLOT’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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: GCC_ANALYZER_WARNING (CWE-476): [#def82]
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/uxlsnr.c: scope_hint: In function ‘client_state_machine’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/uxlsnr.c:513:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/multipathd/uxlsnr.c:30: included_from: Included from here.
device-mapper-multipath-0.10.0-build/multipath-tools-0.10.0/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-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-24.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namedevice-mapper-multipath-0.10.0-2.fc42
store-results-to/tmp/tmp0cunsyh1/device-mapper-multipath-0.10.0-2.fc42.tar.xz
time-created2024-11-12 23:38:25
time-finished2024-11-12 23:40:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp0cunsyh1/device-mapper-multipath-0.10.0-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp0cunsyh1/device-mapper-multipath-0.10.0-2.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9