[Tarantool-patches] [PATCH 5/5] box/vynil: quota -- fix compilation waning

Nikita Pettik korablev at tarantool.org
Tue May 19 15:33:48 MSK 2020


On 18 May 13:15, Cyrill Gorcunov wrote:
> There is a mixture of types and clang prefer
> explicit conversion (since @value is a double).

LGTM as obvious.
 
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
>  src/box/vy_quota.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/box/vy_quota.h b/src/box/vy_quota.h
> index 63d4f6a81..bd7d4e03d 100644
> --- a/src/box/vy_quota.h
> +++ b/src/box/vy_quota.h
> @@ -104,7 +104,7 @@ vy_rate_limit_refill(struct vy_rate_limit *rl, double time)
>  	double value = rl->value + size;
>  	/* Allow bursts up to 2x rate. */
>  	value = MIN(value, size * 2);
> -	rl->value = MIN(value, SSIZE_MAX);
> +	rl->value = MIN((ssize_t)value, SSIZE_MAX);
>  }
>  
>  typedef void
> -- 
> 2.26.2
> 


More information about the Tarantool-patches mailing list