Skip to content
  • Peter Maydell's avatar
    d466d416
    configure: Add braces to clarify intent of $emu[[:space:]] · d466d416
    Peter Maydell authored
    
    
    In shell script syntax, $var[something] is not special for variable
    expansion: $var is expanded.  However, as it can look as if it were
    intended to be an array element access (the correct syntax for which
    is ${var[something]}), shellcheck recommends using explicit braces
    around ${var} to clarify the intended expansion.
    
    This fixes the warning:
    
    In ./configure line 2346:
            if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
                                                                  ^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Message-id: 20220720152631.450903-3-peter.maydell@linaro.org
    d466d416
    configure: Add braces to clarify intent of $emu[[:space:]]
    Peter Maydell authored
    
    
    In shell script syntax, $var[something] is not special for variable
    expansion: $var is expanded.  However, as it can look as if it were
    intended to be an array element access (the correct syntax for which
    is ${var[something]}), shellcheck recommends using explicit braces
    around ${var} to clarify the intended expansion.
    
    This fixes the warning:
    
    In ./configure line 2346:
            if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
                                                                  ^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
    Message-id: 20220720152631.450903-3-peter.maydell@linaro.org
Loading