From 36cf0e057af52567e8b784784a1344a3a72fc72d Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 3 Jun 2024 15:28:31 -0400 Subject: [PATCH] config.sub: disable shellcheck warning SC2162 globally. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- config.sub | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config.sub b/config.sub index 3d4e0fc..5ef447b 100755 --- a/config.sub +++ b/config.sub @@ -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 <