1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Fix -Wtype-limits

This commit is contained in:
Alexey Antipovsky
2020-11-10 18:23:21 +00:00
parent f4a6294c95
commit 0e29b0b0f9
11 changed files with 75 additions and 19 deletions

View File

@ -43,6 +43,8 @@ using namespace logging;
using namespace dataconvert;
#include "collation.h"
#include "checks.h"
namespace
{
struct lconv* convData = localeconv();
@ -349,7 +351,7 @@ uint64_t Func_cast_unsigned::getUintVal(Row& row,
uint64_t value = d.value / pow(10.0, dscale);
int lefto = (d.value - value * pow(10.0, dscale)) / pow(10.0, dscale - 1);
if ( value >= 0 && lefto > 4 )
if ( utils::is_nonnegative(value) && lefto > 4 )
value++;
return value;