[shellcheck] fix SC2155 warning (#8490)

Declare and assign separately to avoid masking return values.
This commit is contained in:
Jonathan Hui
2022-12-07 16:23:20 -08:00
parent 864236cbf1
commit 48c0582e4e
13 changed files with 125 additions and 52 deletions
+6 -3
View File
@@ -65,10 +65,12 @@ set -euxo pipefail
OT_CMAKE_NINJA_TARGET=${OT_CMAKE_NINJA_TARGET:-}
OT_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
readonly OT_SRCDIR
readonly OT_PLATFORMS=(simulation posix)
readonly OT_POSIX_SIM_COMMON_OPTIONS=(
OT_PLATFORMS=(simulation posix)
readonly OT_PLATFORMS
OT_POSIX_SIM_COMMON_OPTIONS=(
"-DOT_ANYCAST_LOCATOR=ON"
"-DOT_BORDER_AGENT=ON"
"-DOT_BORDER_ROUTER=ON"
@@ -106,6 +108,7 @@ readonly OT_POSIX_SIM_COMMON_OPTIONS=(
"-DOT_RCP_RESTORATION_MAX_COUNT=2"
"-DOT_UPTIME=ON"
)
readonly OT_POSIX_SIM_COMMON_OPTIONS
die()
{