diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 10:38:02 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 17:20:46 +0000 |
commit | 7354dc67737fdeb105656f5cec055da627bb9c29 (patch) | |
tree | 7cc2b5f975d5e32eb94cd1344b259ea1b24018d6 /sql-common | |
parent | 509928718d52a14739fcfb2ebf0e68b4c8e01be5 (diff) | |
download | mariadb-git-7354dc67737fdeb105656f5cec055da627bb9c29.tar.gz |
MDEV-13384 - misc Windows warnings fixed
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 10 | ||||
-rw-r--r-- | sql-common/my_time.c | 6 | ||||
-rw-r--r-- | sql-common/mysql_async.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index f3c100db900..a19d9fca8d1 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2807,11 +2807,11 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info) switch (vio->type) { case VIO_TYPE_TCPIP: info->protocol= MYSQL_VIO_TCP; - info->socket= vio_fd(vio); + info->socket= (int)vio_fd(vio); return; case VIO_TYPE_SOCKET: info->protocol= MYSQL_VIO_SOCKET; - info->socket= vio_fd(vio); + info->socket= (int)vio_fd(vio); return; case VIO_TYPE_SSL: { @@ -2821,7 +2821,7 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info) return; info->protocol= addr.sa_family == AF_UNIX ? MYSQL_VIO_SOCKET : MYSQL_VIO_TCP; - info->socket= vio_fd(vio); + info->socket= (int)vio_fd(vio); return; } #ifdef _WIN32 @@ -3558,11 +3558,11 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, scramble_data_len= pkt_scramble_len; scramble_plugin= scramble_data + scramble_data_len; if (scramble_data + scramble_data_len > pkt_end) - scramble_data_len= pkt_end - scramble_data; + scramble_data_len= (int)(pkt_end - scramble_data); } else { - scramble_data_len= pkt_end - scramble_data; + scramble_data_len= (int)(pkt_end - scramble_data); scramble_plugin= native_password_plugin_name; } } diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 5571b87e08a..d7953fe36bf 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -202,7 +202,7 @@ static uint skip_digits(const char **str, const char *end) while (s < end && my_isdigit(&my_charset_latin1, *s)) s++; *str= s; - return s - start; + return (uint)(s - start); } @@ -236,7 +236,7 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status, uint tmp= 0; /* For the case '10:10:10.' */ if (get_digits(&tmp, number_of_fields, str, end, 6)) status->warnings|= MYSQL_TIME_WARN_TRUNCATED; - if ((status->precision= (*str - start)) < 6) + if ((status->precision= (uint)(*str - start)) < 6) *val= (ulong) (tmp * log_10_int[6 - (*str - start)]); else *val= tmp; @@ -358,7 +358,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, const char *start= str; if (get_number(&l_time->year, &number_of_fields, &str, end)) status->warnings|= MYSQL_TIME_WARN_TRUNCATED; - year_length= str - start; + year_length= (uint)(str - start); if (!status->warnings && (get_punct(&str, end) diff --git a/sql-common/mysql_async.c b/sql-common/mysql_async.c index decf48e0e69..1bac16edd1e 100644 --- a/sql-common/mysql_async.c +++ b/sql-common/mysql_async.c @@ -128,7 +128,7 @@ my_connect_async(struct mysql_async_context *b, my_socket fd, #endif ssize_t -my_recv_async(struct mysql_async_context *b, int fd, +my_recv_async(struct mysql_async_context *b, my_socket fd, unsigned char *buf, size_t size, int timeout) { ssize_t res; @@ -156,7 +156,7 @@ my_recv_async(struct mysql_async_context *b, int fd, ssize_t -my_send_async(struct mysql_async_context *b, int fd, +my_send_async(struct mysql_async_context *b, my_socket fd, const unsigned char *buf, size_t size, int timeout) { ssize_t res; |