From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A27B1469710 for ; Tue, 19 May 2020 15:33:49 +0300 (MSK) Date: Tue, 19 May 2020 12:33:48 +0000 From: Nikita Pettik Message-ID: <20200519123348.GA12739@tarantool.org> References: <20200518101502.117121-1-gorcunov@gmail.com> <20200518101502.117121-6-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200518101502.117121-6-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH 5/5] box/vynil: quota -- fix compilation waning List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml , Alexander Turenko 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 > --- > 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 >