config.sub: disable shellcheck warning SC2162 globally.

With the version of shellcheck I have (0.9.0), the existing attempts
to disable SC2162, above each use of read without -r, do not work
because they are not on the line *immediately* previous to the read
command — there’s always a “saved_IFS=$IFS” line in between.  Since
this script must not use read -r at all, we should just be disabling
SC2162 globally.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Zack Weinberg 2024-06-03 15:28:31 -04:00 committed by Dmitry V. Levin
parent 4155d89d0c
commit 36cf0e057a

5
config.sub vendored
View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2024 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
timestamp='2024-03-12'
@ -120,7 +120,6 @@ case $# in
esac
# Split fields of configuration type
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read field1 field2 field3 field4 <<EOF
$1
@ -937,7 +936,6 @@ case $basic_machine in
;;
*-*)
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read cpu vendor <<EOF
$basic_machine
@ -1307,7 +1305,6 @@ case $basic_os in
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
;;
*-*)
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read kernel os <<EOF
$basic_os