From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (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 710E4469710 for ; Mon, 18 May 2020 13:16:01 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id a9so7528110lfb.8 for ; Mon, 18 May 2020 03:16:01 -0700 (PDT) From: Cyrill Gorcunov Date: Mon, 18 May 2020 13:15:01 +0300 Message-Id: <20200518101502.117121-5-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 4/5] box/sql: vdbemem -- fix compilation warning List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Alexander Turenko d is "double" thus placate clang. Signed-off-by: Cyrill Gorcunov --- src/box/sql/vdbemem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c index 8dad2db9a..9fe611c7c 100644 --- a/src/box/sql/vdbemem.c +++ b/src/box/sql/vdbemem.c @@ -686,11 +686,11 @@ sqlVdbeMemCast(Mem * pMem, enum field_type type) double d; if (sqlVdbeRealValue(pMem, &d) != 0) return -1; - if (d < INT64_MAX && d >= INT64_MIN) { + if (d < (double)INT64_MAX && d >= (double)INT64_MIN) { mem_set_int(pMem, d, d <= -1); return 0; } - if (d >= INT64_MAX && d < UINT64_MAX) { + if (d >= (double)INT64_MAX && d < (double)UINT64_MAX) { mem_set_u64(pMem, d); return 0; } -- 2.26.2