[Tarantool-patches] [PATCH 4/5] box/sql: vdbemem -- fix compilation warning
Cyrill Gorcunov
gorcunov at gmail.com
Mon May 18 13:15:01 MSK 2020
d is "double" thus placate clang.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
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
More information about the Tarantool-patches
mailing list