1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

compilation failure on windows

libmariadb\libmariadb\ma_stmt_codec.c(263): warning C4244: '*=': conversion from 'double' to 'unsigned long', possible loss of data

generally avoid slow floating point pow() when all you need is to
multiply an integer by a small power of 10.
This commit is contained in:
Sergei Golubchik
2018-11-07 07:45:23 +01:00
parent 41b988ddcf
commit efc9f60dbf
2 changed files with 5 additions and 2 deletions

View File

@@ -4821,7 +4821,7 @@ static int test_conc_fraction(MYSQL *mysql)
diag("second_part: %ld", tm.second_part);
expected= 9 * powl(10, (5 - i));
expected= 9 * (unsigned int)powl(10, (5 - i));
FAIL_IF(tm.second_part != expected, "expected fractional part to be 900000");