Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/makepkg:496:44: warning[SC2154]: xdata is referenced but not assigned.
#  494|   	write_kv_pair "pkgname" "$pkgname"
#  495|   	write_kv_pair "pkgbase" "$pkgbase"
#  496|-> 	write_kv_pair "xdata" "pkgtype=$pkgtype" "${xdata[@]}"
#  497|   
#  498|   	local fullver=$(get_full_version)

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/repo-add:367:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  365|   
#  366|   		if (( RMEXISTING )); then
#  367|-> 			local oldfilename="$(sed -n '/^%FILENAME%$/ {n;p;q;}' "$pkgentry/desc")"
#  368|   			local oldfile="$repodir/$oldfilename"
#  369|   

Error: SHELLCHECK_WARNING (CWE-153):
/usr/share/makepkg/autodep/library_depends.sh:54:28: warning[SC2053]: Quote the right-hand side of == in [[ ]] to prevent glob matching.
#   52|   				unset prefix
#   53|   				for libdir in ${LIB_DIRS[@]}; do
#   54|-> 					if [[ ${libdir#*:} == ${libpath} ]]; then
#   55|   						prefix=${libdir%%:*}
#   56|   					fi

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/buildenv/compiler.sh:47:10: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   45|   	if check_buildoption "distcc" "y"; then
#   46|   		if (( using_ccache )); then
#   47|-> 			local distcc=$(type -p distcc)
#   48|   			if [[ " $CCACHE_PREFIX " != *" ${distcc} "* ]]; then
#   49|   				export CCACHE_PREFIX="${CCACHE_PREFIX:+$CCACHE_PREFIX }${distcc}"

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/makepkg/lint_config/buildenv.sh:55:3: warning[SC2034]: ret appears unused. Verify use (or export if used externally).
#   53|   
#   54|   		error "$(gettext "%s array contains unknown option '%s'")" "OPTIONS" "$i"
#   55|-> 		ret=1
#   56|   	done
#   57|   }

Error: SHELLCHECK_WARNING (CWE-88):
/usr/share/makepkg/lint_pkgbuild/arch.sh:43:39: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   41|   	fi
#   42|   
#   43|-> 	if (( ${#arch[@]} != $(printf "%s\n" ${arch[@]} | sort -u | wc -l) )); then
#   44|   		error "$(gettext "%s can not contain duplicate values")" 'arch'
#   45|   		ret=1

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/makepkg/reproducible/source_date_epoch.sh:29:2: warning[SC2034]: REPRODUCIBLE appears unused. Verify use (or export if used externally).
#   27|   
#   28|   if [[ -n $SOURCE_DATE_EPOCH ]]; then
#   29|-> 	REPRODUCIBLE=1
#   30|   else
#   31|   	SOURCE_DATE_EPOCH=$(date +%s)

Error: SHELLCHECK_WARNING (CWE-88):
/usr/share/makepkg/tidy/10-docs.sh:35:13: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   33|   	if check_option "docs" "n" && [[ -n ${DOC_DIRS[*]} ]]; then
#   34|   		msg2 "$(gettext "Removing doc files...")"
#   35|-> 		rm -rf -- ${DOC_DIRS[@]}
#   36|   	fi
#   37|   }

Error: SHELLCHECK_WARNING (CWE-149):
/usr/share/makepkg/tidy/10-libtool.sh:35:30: warning[SC2140]: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
#   33|   tidy_libtool() {
#   34|   	if check_option "libtool" "n"; then
#   35|-> 		msg2 "$(gettext "Removing "%s" files...")" "libtool"
#   36|   		find . ! -type d -name "*.la" -exec rm -f -- '{}' +
#   37|   	fi

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/makepkg/tidy/50-strip.sh:49:15: warning[SC2154]: srcdir is referenced but not assigned.
#   47|   
#   48|   	LANG=C debugedit --no-recompute-build-id \
#   49|-> 		--base-dir "${srcdir}" \
#   50|   		--dest-dir "${dbgsrcdir}" \
#   51|   		--list-file /dev/stdout "$1" \

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/tidy/50-strip.sh:71:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   69|   safe_objcopy() {
#   70|   	local binary=$1; shift
#   71|-> 	local tempfile=$(mktemp "$binary.XXXXXX")
#   72|   	objcopy "$@" "$binary" "$tempfile"
#   73|   	cat "$tempfile" > "$binary"

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/tidy/50-strip.sh:81:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   79|   
#   80|   	if check_option "debug" "y"; then
#   81|-> 		local bid=$(build_id "$binary")
#   82|   
#   83|   		# has this file already been stripped

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/tidy/50-strip.sh:128:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  126|   safe_strip_file(){
#  127|   	local binary=$1; shift
#  128|-> 	local tempfile=$(mktemp "$binary.XXXXXX")
#  129|   	if strip "$@" "$binary" -o "$tempfile"; then
#  130|   		cat "$tempfile" > "$binary"

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/tidy/50-strip.sh:138:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  136|   	local binary=$1;
#  137|   
#  138|-> 	local tempfile=$(mktemp "$binary.XXXXXX")
#  139|   	if strip -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 "$binary" -o "$tempfile"; then
#  140|   		cat "$tempfile" > "$binary"

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/makepkg/tidy/50-strip.sh:192:12: warning[SC2154]: pkgdirbase is referenced but not assigned.
#  190|   
#  191|   		if check_option "debug" "y"; then
#  192|-> 			dbgdir="$pkgdirbase/$pkgbase-debug/usr/lib/debug"
#  193|   			dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
#  194|   			dbgsrc="$pkgdirbase/$pkgbase-debug$dbgsrcdir"

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/makepkg/tidy/50-strip.sh:192:24: warning[SC2154]: pkgbase is referenced but not assigned.
#  190|   
#  191|   		if check_option "debug" "y"; then
#  192|-> 			dbgdir="$pkgdirbase/$pkgbase-debug/usr/lib/debug"
#  193|   			dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
#  194|   			dbgsrc="$pkgdirbase/$pkgbase-debug$dbgsrcdir"

Error: SHELLCHECK_WARNING (CWE-140):
/usr/share/makepkg/tidy/50-strip.sh:207:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  205|   					# Be sure to keep the number of concurrently running processes less
#  206|   					# than limit value to prevent an accidental fork bomb.
#  207|-> 					jobs=($(jobs -p))
#  208|   					(( ${#jobs[@]} >= $NPROC )) && wait -n "${jobs[@]}"
#  209|   

Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/makepkg/tidy/50-strip.sh:224:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  222|   		while IFS= read -rd '' binary ; do
#  223|   			if check_option "debug" "y"; then
#  224|-> 				local inode="$(stat -c '%i %n' -- "$binary")"
#  225|   				inode=${inode%% *}
#  226|   				if [[ -z "${hardlinks[$inode]}" ]]; then

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/makepkg/util/config.sh:81:14: warning[SC2034]: BUILDENV appears unused. Verify use (or export if used externally).
#   79|   
#   80|   	# prevent altering these directly
#   81|-> 	readonly -a BUILDENV OPTIONS
#   82|   
#   83|   	eval "$restore_envvars"

Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/makepkg/util/config.sh:81:23: warning[SC2034]: OPTIONS appears unused. Verify use (or export if used externally).
#   79|   
#   80|   	# prevent altering these directly
#   81|-> 	readonly -a BUILDENV OPTIONS
#   82|   
#   83|   	eval "$restore_envvars"

Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/makepkg/util/option.sh:86:40: warning[SC2154]: options is referenced but not assigned (did you mean 'option'?).
#   84|   check_option() {
#   85|   	declare -n options_arch=options_$CARCH
#   86|-> 	check_opt_array "$@" "${OPTIONS[@]}" "${options[@]}" "${options_arch[@]}"
#   87|   }
#   88|   
