SC2145: Argument mixes string and array. Use * or separate argument.
The behavior when concatenating a string and array is rarely intended. The preceeding string is prefixed to the first array element, while the succeeding string is appended to the last one. The middle array elements are unaffected. For example, with the parameters foo,bar,baz, "--flag=$@" is equivalent to the three arguments "--flag=foo" "bar" "baz". PR: 227109 Submitted by: mat Sponsored by: Absolight
This commit is contained in:
parent
d50a3768f8
commit
d605296d6e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=471264
3 changed files with 11 additions and 11 deletions
|
@ -74,9 +74,9 @@ parse_plist() {
|
|||
@info\ *|@shell\ *|@xmlcatmgr\ *)
|
||||
set -- $line
|
||||
shift
|
||||
case "$@" in
|
||||
/*) echo "${comment}$@" ;;
|
||||
*) echo "${comment}${cwd}/$@" ;;
|
||||
case "$*" in
|
||||
/*) echo "${comment}$*" ;;
|
||||
*) echo "${comment}${cwd}/$*" ;;
|
||||
esac
|
||||
;;
|
||||
@sample\ *)
|
||||
|
@ -103,12 +103,12 @@ parse_plist() {
|
|||
@fc\ *|@fcfontsdir\ *|@fontsdir\ *)
|
||||
set -- $line
|
||||
shift
|
||||
case "$@" in
|
||||
case "$*" in
|
||||
/*)
|
||||
echo >&3 "${comment}$@"
|
||||
echo >&3 "${comment}$*"
|
||||
;;
|
||||
*)
|
||||
echo >&3 "${comment}${cwd}/$@"
|
||||
echo >&3 "${comment}${cwd}/$*"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Maintainer: portmgr@FreeBSD.org
|
||||
|
||||
msg() {
|
||||
echo "====> $@"
|
||||
echo "====> $*"
|
||||
}
|
||||
|
||||
msg "Finding symbols"
|
||||
|
|
|
@ -13,15 +13,15 @@ LF=$(printf '\nX')
|
|||
LF=${LF%X}
|
||||
|
||||
notice() {
|
||||
echo "Notice: $@" >&2
|
||||
echo "Notice: $*" >&2
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo "Warning: $@" >&2
|
||||
echo "Warning: $*" >&2
|
||||
}
|
||||
|
||||
err() {
|
||||
echo "Error: $@" >&2
|
||||
echo "Error: $*" >&2
|
||||
}
|
||||
|
||||
list_stagedir_elfs() {
|
||||
|
@ -31,7 +31,7 @@ list_stagedir_elfs() {
|
|||
shebangonefile() {
|
||||
local f interp interparg badinterp rc
|
||||
|
||||
f="$@"
|
||||
f="$*"
|
||||
rc=0
|
||||
|
||||
# whitelist some files
|
||||
|
|
Loading…
Reference in a new issue