summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-01-12 18:25:02 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-01-26 10:37:46 +0000
commit9891ee5a2aadd2672d8d7f6b217e852344ff86eb (patch)
tree2f5950ed243a10e36e1d8b9609c6426946fe9011 /vio/viossl.c
parent859d100d70a9dba222b229bbc0d5a01194e8ed5f (diff)
downloadmariadb-git-9891ee5a2aadd2672d8d7f6b217e852344ff86eb.tar.gz
Fix and reenable Windows compiler warning C4800 (size_t conversion).
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index e7cc85ea539..000a526a892 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -141,10 +141,10 @@ size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size)
vio->ssl_arg));
if (vio->async_context && vio->async_context->active)
- ret= my_ssl_read_async(vio->async_context, (SSL *)vio->ssl_arg, buf, size);
+ ret= my_ssl_read_async(vio->async_context, (SSL *)vio->ssl_arg, buf, (int)size);
else
{
- while ((ret= SSL_read(ssl, buf, size)) < 0)
+ while ((ret= SSL_read(ssl, buf, (int)size)) < 0)
{
enum enum_vio_io_event event;
@@ -174,10 +174,10 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
if (vio->async_context && vio->async_context->active)
ret= my_ssl_write_async(vio->async_context, (SSL *)vio->ssl_arg, buf,
- size);
+ (int)size);
else
{
- while ((ret= SSL_write(ssl, buf, size)) < 0)
+ while ((ret= SSL_write(ssl, buf, (int)size)) < 0)
{
enum enum_vio_io_event event;
@@ -200,7 +200,7 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
static long yassl_recv(void *ptr, void *buf, size_t len,
int flag __attribute__((unused)))
{
- return vio_read(ptr, buf, len);
+ return (long)vio_read(ptr, buf, len);
}
@@ -208,7 +208,7 @@ static long yassl_recv(void *ptr, void *buf, size_t len,
static long yassl_send(void *ptr, const void *buf, size_t len,
int flag __attribute__((unused)))
{
- return vio_write(ptr, buf, len);
+ return (long)vio_write(ptr, buf, len);
}
#endif