qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: silence 'shift' error message in version_ge()


From: Paolo Bonzini
Subject: Re: [PATCH] configure: silence 'shift' error message in version_ge()
Date: Fri, 21 Aug 2020 17:10:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 21/08/20 17:00, Stefano Garzarella wrote:
> If there are less than 2 arguments in version_ge(), the second shift
> prints this error:
>     ../configure: line 232: shift: shift count out of range
> 
> Let's shut it up, since we're expecting this situation.
> 
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 4e5fe33211..de4bd0df36 100755
> --- a/configure
> +++ b/configure
> @@ -229,7 +229,7 @@ version_ge () {
>          set x $local_ver1
>          local_first=${2-0}
>          # shift 2 does nothing if there are less than 2 arguments
> -        shift; shift
> +        shift; shift 2>/dev/null
>          local_ver1=$*
>          set x $local_ver2
>          # the second argument finished, the first must be greater or equal
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]