From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EACFD4696C0 for ; Mon, 18 May 2020 13:16:12 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id g4so9209834ljl.2 for ; Mon, 18 May 2020 03:16:12 -0700 (PDT) From: Cyrill Gorcunov Date: Mon, 18 May 2020 13:15:02 +0300 Message-Id: <20200518101502.117121-6-gorcunov@gmail.com> In-Reply-To: <20200518101502.117121-1-gorcunov@gmail.com> References: <20200518101502.117121-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: tml Cc: Alexander Turenko There is a mixture of types and clang prefer explicit conversion (since @value is a double). 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