config.guess: fix shellcheck warning SC2154

While, according to Plan 9 documentation, the environment variable
$cputype is set to the name of the kernel's CPU's architecture,
shellcheck warns that cputype is referenced but not assigned.
Be on the safe side and do not use cputype if it is not defined
or empty.

* config.guess (*:Plan9:*:*): Fix shellcheck warning SC2154.
This commit is contained in:
Dmitry V. Levin 2021-05-24 08:00:00 +00:00
parent 9a37c126ce
commit 4550d2f15b

5
config.guess vendored
View File

@ -1437,10 +1437,9 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
# shellcheck disable=SC2154
if test "$cputype" = 386; then
if test "${cputype-}" = 386; then
UNAME_MACHINE=i386
else
elif test "x${cputype-}" != x; then
UNAME_MACHINE="$cputype"
fi
echo "$UNAME_MACHINE"-unknown-plan9