diff options
author | monty@mysql.com/nosik.monty.fi <> | 2006-11-20 22:42:06 +0200 |
---|---|---|
committer | monty@mysql.com/nosik.monty.fi <> | 2006-11-20 22:42:06 +0200 |
commit | e82587980037d3c27d84411c332d812d47f424bd (patch) | |
tree | c8a26659fd67578dcb2edfa68c23c6ca4650fc4e /vio | |
parent | 0f455a81dc2060811498cf1e18059d4f2c7ecd87 (diff) | |
download | mariadb-git-e82587980037d3c27d84411c332d812d47f424bd.tar.gz |
Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viosocket.c | 16 | ||||
-rw-r--r-- | vio/viossl.c | 20 | ||||
-rw-r--r-- | vio/viosslfactories.c | 8 |
3 files changed, 22 insertions, 22 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c index 21b3dae906a..cae0cf70db4 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -33,7 +33,7 @@ int vio_read(Vio * vio, gptr buf, int size) { int r; DBUG_ENTER("vio_read"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size)); /* Ensure nobody uses vio_read_buff and vio_read simultaneously */ DBUG_ASSERT(vio->read_end == vio->read_pos); @@ -64,7 +64,7 @@ int vio_read_buff(Vio *vio, gptr buf, int size) int rc; #define VIO_UNBUFFERED_READ_MIN_SIZE 2048 DBUG_ENTER("vio_read_buff"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size)); if (vio->read_pos < vio->read_end) { @@ -102,7 +102,7 @@ int vio_write(Vio * vio, const gptr buf, int size) { int r; DBUG_ENTER("vio_write"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size)); #ifdef __WIN__ r = send(vio->sd, buf, size,0); #else @@ -227,7 +227,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive) int r=0; uint opt = 0; DBUG_ENTER("vio_keepalive"); - DBUG_PRINT("enter", ("sd: %d, set_keep_alive: %d", vio->sd, (int) + DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", vio->sd, (int) set_keep_alive)); if (vio->type != VIO_TYPE_NAMEDPIPE) { @@ -411,7 +411,7 @@ int vio_read_pipe(Vio * vio, gptr buf, int size) { DWORD length; DBUG_ENTER("vio_read_pipe"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size)); if (!ReadFile(vio->hPipe, buf, size, &length, NULL)) DBUG_RETURN(-1); @@ -425,7 +425,7 @@ int vio_write_pipe(Vio * vio, const gptr buf, int size) { DWORD length; DBUG_ENTER("vio_write_pipe"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size)); if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL)) DBUG_RETURN(-1); @@ -470,7 +470,7 @@ int vio_read_shared_memory(Vio * vio, gptr buf, int size) char *current_postion; DBUG_ENTER("vio_read_shared_memory"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size)); remain_local = size; current_postion=buf; @@ -531,7 +531,7 @@ int vio_write_shared_memory(Vio * vio, const gptr buf, int size) char *current_postion; DBUG_ENTER("vio_write_shared_memory"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size)); remain = size; current_postion = buf; diff --git a/vio/viossl.c b/vio/viossl.c index b5fd0e11c02..f436262a3ce 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -87,8 +87,8 @@ int vio_ssl_read(Vio *vio, gptr buf, int size) { int r; DBUG_ENTER("vio_ssl_read"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d, ssl_: 0x%lx", - vio->sd, buf, size, vio->ssl_arg)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d ssl: 0x%lx", + vio->sd, (long) buf, size, (long) vio->ssl_arg)); r= SSL_read((SSL*) vio->ssl_arg, buf, size); #ifndef DBUG_OFF @@ -104,7 +104,7 @@ int vio_ssl_write(Vio *vio, const gptr buf, int size) { int r; DBUG_ENTER("vio_ssl_write"); - DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size)); + DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size)); r= SSL_write((SSL*) vio->ssl_arg, buf, size); #ifndef DBUG_OFF @@ -133,7 +133,7 @@ int vio_ssl_close(Vio *vio) break; /* Fallthrough */ default: /* Shutdown failed */ - DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %s", + DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d", SSL_get_error(ssl, r))); break; } @@ -151,8 +151,8 @@ int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout) my_bool net_blocking; enum enum_vio_type old_type; DBUG_ENTER("sslaccept"); - DBUG_PRINT("enter", ("sd: %d ptr: %p, timeout: %d", - vio->sd, ptr, timeout)); + DBUG_PRINT("enter", ("sd: %d ptr: 0x%lx, timeout: %ld", + vio->sd, (long) ptr, timeout)); old_type= vio->type; net_blocking= vio_is_blocking(vio); @@ -168,7 +168,7 @@ int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout) DBUG_RETURN(1); } vio->ssl_arg= (void*)ssl; - DBUG_PRINT("info", ("ssl_: %p timeout: %ld", ssl, timeout)); + DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout)); SSL_clear(ssl); SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); SSL_set_fd(ssl, vio->sd); @@ -226,8 +226,8 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout) enum enum_vio_type old_type; DBUG_ENTER("sslconnect"); - DBUG_PRINT("enter", ("sd: %d, ptr: %p, ctx: %p", - vio->sd, ptr, ptr->ssl_context)); + DBUG_PRINT("enter", ("sd: %d ptr: 0x%lx ctx: 0x%lx", + vio->sd, (long) ptr, (long) ptr->ssl_context)); old_type= vio->type; net_blocking= vio_is_blocking(vio); @@ -242,7 +242,7 @@ int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout) DBUG_RETURN(1); } vio->ssl_arg= (void*)ssl; - DBUG_PRINT("info", ("ssl: %p, timeout: %ld", ssl, timeout)); + DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout)); SSL_clear(ssl); SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); SSL_set_fd(ssl, vio->sd); diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 34ce1fefaa9..014ce25d754 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -79,8 +79,8 @@ static int vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) { DBUG_ENTER("vio_set_cert_stuff"); - DBUG_PRINT("enter", ("ctx: %p, cert_file: %s, key_file: %s", - ctx, cert_file, key_file)); + DBUG_PRINT("enter", ("ctx: 0x%lx cert_file: %s key_file: %s", + (long) ctx, cert_file, key_file)); if (cert_file) { if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) @@ -128,7 +128,7 @@ vio_verify_callback(int ok, X509_STORE_CTX *ctx) X509 *err_cert; DBUG_ENTER("vio_verify_callback"); - DBUG_PRINT("enter", ("ok: %d, ctx: %p", ok, ctx)); + DBUG_PRINT("enter", ("ok: %d ctx: 0x%lx", ok, (long) ctx)); err_cert= X509_STORE_CTX_get_current_cert(ctx); X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf)); @@ -139,7 +139,7 @@ vio_verify_callback(int ok, X509_STORE_CTX *ctx) err= X509_STORE_CTX_get_error(ctx); depth= X509_STORE_CTX_get_error_depth(ctx); - DBUG_PRINT("error",("verify error: %d, '%s'",err, + DBUG_PRINT("error",("verify error: %d '%s'",err, X509_verify_cert_error_string(err))); /* Approve cert if depth is greater then "verify_depth", currently |