commit:     df52bb0f4b48f3abd935709770a66107a38196d8
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Feb 13 02:12:17 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 05:29:40 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=df52bb0f

Alleviate and/or mute some ineffectual shellcheck warnings

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/functions.sh b/functions.sh
index aa3d1d9..9bae772 100644
--- a/functions.sh
+++ b/functions.sh
@@ -7,6 +7,7 @@
 # not use bashisms.
 #
 
+# shellcheck disable=2034
 RC_GOT_FUNCTIONS="yes"
 
 #
@@ -407,7 +408,7 @@ is_older_than()
                        find "$@"
                fi
        } |
-       read -r line
+       read -r _
 }
 
 #
@@ -465,6 +466,7 @@ for arg in "$@" ; do
 done
 
 # Define COLS and ENDCOL so that eend can line up the [ ok ].
+# shellcheck disable=3044
 if [ -n "${BASH}" ] && shopt -s checkwinsize 2>/dev/null; then
        # As is documented, running an external command will cause bash to set
        # the COLUMNS variable. This technique is effective for >=4.3, though
@@ -480,8 +482,8 @@ else
        # size operand is not portable.
        COLS=$(
                stty size 2>/dev/null | {
-                       if read -r h w _; then
-                               printf '%s\n' "$w"
+                       if read -r _ cols _; then
+                               printf '%s\n' "${cols}"
                        fi
                }
        )

Reply via email to