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

Cyrill Gorcunov gorcunov at gmail.com
Mon May 18 13:15:02 MSK 2020


There is a mixture of types and clang prefer
explicit conversion (since @value is a double).

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