mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Avoid compiler warnings in Windows builds introduced by the patch for bug #24912 "problems with bigint in abs() ceiling() ruond() truncate() mod()"
This commit is contained in:
parent
561bd78654
commit
edf6b73302
1 changed files with 3 additions and 3 deletions
|
@ -2045,7 +2045,7 @@ longlong Item_func_round::int_op()
|
||||||
else
|
else
|
||||||
value= (unsigned_flag || value >= 0) ?
|
value= (unsigned_flag || value >= 0) ?
|
||||||
my_unsigned_round((ulonglong) value, tmp) :
|
my_unsigned_round((ulonglong) value, tmp) :
|
||||||
-my_unsigned_round((ulonglong) -value, tmp);
|
-(longlong) my_unsigned_round((ulonglong) -value, tmp);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2057,13 +2057,13 @@ my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
|
||||||
if (dec > 0 || (dec < 0 && args[1]->unsigned_flag))
|
if (dec > 0 || (dec < 0 && args[1]->unsigned_flag))
|
||||||
{
|
{
|
||||||
dec= min((ulonglong) dec, DECIMAL_MAX_SCALE);
|
dec= min((ulonglong) dec, DECIMAL_MAX_SCALE);
|
||||||
decimals= dec; // to get correct output
|
decimals= (uint8) dec; // to get correct output
|
||||||
}
|
}
|
||||||
else if (dec < INT_MIN)
|
else if (dec < INT_MIN)
|
||||||
dec= INT_MIN;
|
dec= INT_MIN;
|
||||||
|
|
||||||
if (!(null_value= (args[0]->null_value || args[1]->null_value ||
|
if (!(null_value= (args[0]->null_value || args[1]->null_value ||
|
||||||
my_decimal_round(E_DEC_FATAL_ERROR, value, dec,
|
my_decimal_round(E_DEC_FATAL_ERROR, value, (int) dec,
|
||||||
truncate, decimal_value) > 1)))
|
truncate, decimal_value) > 1)))
|
||||||
return decimal_value;
|
return decimal_value;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue