summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-19 17:45:17 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commiteba44874ca9fc317696630cb371623142289fa99 (patch)
treef67cd5dbcaf102abef2fb26f76357d14feaded04 /vio/viossl.c
parentde7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff)
downloadmariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index 0bc2c263336..e7cc85ea539 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -136,8 +136,8 @@ size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size)
int ret;
SSL *ssl= vio->ssl_arg;
DBUG_ENTER("vio_ssl_read");
- DBUG_PRINT("enter", ("sd: %d buf: %p size: %d ssl: %p",
- mysql_socket_getfd(vio->mysql_socket), buf, (int) size,
+ DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu ssl: %p",
+ (int)mysql_socket_getfd(vio->mysql_socket), buf, size,
vio->ssl_arg));
if (vio->async_context && vio->async_context->active)
@@ -168,9 +168,9 @@ size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size)
int ret;
SSL *ssl= vio->ssl_arg;
DBUG_ENTER("vio_ssl_write");
- DBUG_PRINT("enter", ("sd: %d buf: %p size: %d",
- mysql_socket_getfd(vio->mysql_socket),
- buf, (int) size));
+ DBUG_PRINT("enter", ("sd: %d buf: %p size: %zu",
+ (int)mysql_socket_getfd(vio->mysql_socket),
+ buf, size));
if (vio->async_context && vio->async_context->active)
ret= my_ssl_write_async(vio->async_context, (SSL *)vio->ssl_arg, buf,
@@ -319,8 +319,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
my_bool was_blocking;
my_socket sd= mysql_socket_getfd(vio->mysql_socket);
DBUG_ENTER("ssl_do");
- DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx",
- (long) ptr, sd, (long) ptr->ssl_context));
+ DBUG_PRINT("enter", ("ptr: %p, sd: %d ctx: %p",
+ ptr, (int)sd, ptr->ssl_context));
/* Set socket to blocking if not already set */
vio_blocking(vio, 1, &was_blocking);
@@ -332,7 +332,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
vio_blocking(vio, was_blocking, &unused);
DBUG_RETURN(1);
}
- DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout));
+ DBUG_PRINT("info", ("ssl: %p timeout: %ld", ssl, timeout));
SSL_clear(ssl);
SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
SSL_set_fd(ssl, sd);