ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.JjT4EAh4t5 and /tmp/tmp.MGurnfpERC Tree base: ab5ddb08e6ca ("atomic: Add atomic_cond_read_*_timeout()") Now at: 3ec459180d55 ("locking/atomic: scripts: build atomic_long_cond_read_*_timeout()") ====== Checking before the patch ====== Checking scripts/atomic/gen-atomic-long.sh - 35f3d2aa2f5d1722de84af50360afdc60093a2d8a3a7c00de4a399eedf3c8e70 In gen-atomic-long.sh line 4: ATOMICDIR=$(dirname $0) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ATOMICDIR=$(dirname "$0") In gen-atomic-long.sh line 6: . ${ATOMICDIR}/atomic-tbl.sh ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: . "${ATOMICDIR}"/atomic-tbl.sh In gen-atomic-long.sh line 11: local arg="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 12: local int="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 13: local atomic="$1"; shift ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 17: printf "($(gen_param_type "${arg}" "${int}" "${atomic}"))" ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In gen-atomic-long.sh line 23: local int="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 24: local atomic="$1"; shift ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 27: local cast="$(gen_cast "$1" "${int}" "${atomic}")" ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 28: local arg="$(gen_param_name "$1")" ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 29: printf "${cast}${arg}" ^-------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In gen-atomic-long.sh line 38: local meta="$1"; shift ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 39: local pfx="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 40: local name="$1"; shift ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 41: local sfx="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 42: local order="$1"; shift ^---------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 44: local atomicname="${pfx}${name}${sfx}${order}" ^--------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 46: local ret="$(gen_ret_type "${meta}" "long")" ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 47: local params="$(gen_params "long" "atomic_long" "$@")" ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 48: local argscast_32="$(gen_args_cast "int" "atomic" "$@")" ^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 49: local argscast_64="$(gen_args_cast "s64" "atomic64" "$@")" ^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 50: local retstmt="$(gen_ret_stmt "${meta}")" ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 94: grep '^[a-z]' "$1" | while read name meta args; do ^--^ SC2162 (info): read without -r will mangle backslashes. In gen-atomic-long.sh line 95: gen_proto "${meta}" "${name}" ${args} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: gen_proto "${meta}" "${name}" "${args}" For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... ====== Checking the tree with the patch ====== Checking scripts/atomic/gen-atomic-long.sh - 35f3d2aa2f5d1722de84af50360afdc60093a2d8a3a7c00de4a399eedf3c8e70 In gen-atomic-long.sh line 4: ATOMICDIR=$(dirname $0) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ATOMICDIR=$(dirname "$0") In gen-atomic-long.sh line 6: . ${ATOMICDIR}/atomic-tbl.sh ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: . "${ATOMICDIR}"/atomic-tbl.sh In gen-atomic-long.sh line 11: local arg="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 12: local int="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 13: local atomic="$1"; shift ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 17: printf "($(gen_param_type "${arg}" "${int}" "${atomic}"))" ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In gen-atomic-long.sh line 23: local int="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 24: local atomic="$1"; shift ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 27: local cast="$(gen_cast "$1" "${int}" "${atomic}")" ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 28: local arg="$(gen_param_name "$1")" ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 29: printf "${cast}${arg}" ^-------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In gen-atomic-long.sh line 38: local meta="$1"; shift ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 39: local pfx="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 40: local name="$1"; shift ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 41: local sfx="$1"; shift ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 42: local order="$1"; shift ^---------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 44: local atomicname="${pfx}${name}${sfx}${order}" ^--------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. In gen-atomic-long.sh line 46: local ret="$(gen_ret_type "${meta}" "long")" ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 47: local params="$(gen_params "long" "atomic_long" "$@")" ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 48: local argscast_32="$(gen_args_cast "int" "atomic" "$@")" ^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 49: local argscast_64="$(gen_args_cast "s64" "atomic64" "$@")" ^---------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 50: local retstmt="$(gen_ret_stmt "${meta}")" ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined. ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In gen-atomic-long.sh line 98: grep '^[a-z]' "$1" | while read name meta args; do ^--^ SC2162 (info): read without -r will mangle backslashes. In gen-atomic-long.sh line 99: gen_proto "${meta}" "${name}" ${args} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: gen_proto "${meta}" "${name}" "${args}" For more information: https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf...