From c2baa3226068c5d56c1602ea34009dac9376041c Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Wed, 4 Sep 2019 17:17:44 +0600 Subject: [PATCH] fix compile warnings in testclients/mysql_client_test.cc Signed-off-by: Alexander Kuleshov --- testclients/mysql_client_test.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testclients/mysql_client_test.cc b/testclients/mysql_client_test.cc index f965c5d6695..da3ef24fad5 100644 --- a/testclients/mysql_client_test.cc +++ b/testclients/mysql_client_test.cc @@ -5517,7 +5517,8 @@ static void test_subselect() { static void bind_date_conv(uint row_count, bool preserveFractions) { MYSQL_STMT *stmt = 0; - uint rc, i, count = row_count; + int i; + uint rc, count = row_count; ulong length[4]; MYSQL_BIND my_bind[4]; bool is_null[4] = {0}; @@ -5613,7 +5614,7 @@ static void bind_date_conv(uint row_count, bool preserveFractions) { DIE_UNLESS(rc == 0 || rc == MYSQL_DATA_TRUNCATED); if (!opt_silent) fprintf(stdout, "\n"); - for (i = 0; i < array_elements(my_bind); i++) { + for (i = 0; i < (int)array_elements(my_bind); i++) { if (!opt_silent) fprintf(stdout, "\ntime[%d]: %02d-%02d-%02d %02d:%02d:%02d.%06lu", i, tm[i].year, tm[i].month, tm[i].day, tm[i].hour, tm[i].minute, @@ -16791,7 +16792,8 @@ static void test_bug33831(void) { } static void test_bug40365(void) { - uint rc, i; + uint rc; + int i; MYSQL_STMT *stmt = 0; MYSQL_BIND my_bind[2]; bool is_null[2] = {0}; @@ -16855,7 +16857,7 @@ static void test_bug40365(void) { if (!opt_silent) fprintf(stdout, "\n"); - for (i = 0; i < array_elements(my_bind); i++) { + for (i = 0; i < (int)array_elements(my_bind); i++) { if (!opt_silent) fprintf(stdout, "\ntime[%d]: %02d-%02d-%02d ", i, tm[i].year, tm[i].month, tm[i].day); -- 2.21.0