summaryrefslogtreecommitdiff
path: root/sql-common/client.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 /sql-common/client.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 'sql-common/client.c')
-rw-r--r--sql-common/client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 2792c575aef..f3c100db900 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -952,7 +952,7 @@ void STDCALL
mysql_free_result(MYSQL_RES *result)
{
DBUG_ENTER("mysql_free_result");
- DBUG_PRINT("enter",("mysql_res: 0x%lx", (long) result));
+ DBUG_PRINT("enter",("mysql_res: %p", result));
if (result)
{
MYSQL *mysql= result->handle;
@@ -1653,7 +1653,7 @@ mysql_init(MYSQL *mysql)
*/
mysql->reconnect= 0;
- DBUG_PRINT("mysql",("mysql: 0x%lx", (long) mysql));
+ DBUG_PRINT("mysql",("mysql: %p", mysql));
return mysql;
}
@@ -3379,7 +3379,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
}
DBUG_PRINT("info",
("End of connect attempts, sock: %d status: %d error: %d",
- sock, status, saved_error));
+ (int)sock, status, saved_error));
freeaddrinfo(res_lst);
@@ -3633,7 +3633,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
}
#endif
- DBUG_PRINT("exit", ("Mysql handler: 0x%lx", (long) mysql));
+ DBUG_PRINT("exit", ("Mysql handler: %p",mysql));
DBUG_RETURN(mysql);
error:
@@ -3955,7 +3955,7 @@ void STDCALL mysql_close_slow_part(MYSQL *mysql)
void STDCALL mysql_close(MYSQL *mysql)
{
DBUG_ENTER("mysql_close");
- DBUG_PRINT("enter", ("mysql: 0x%lx", (long) mysql));
+ DBUG_PRINT("enter", ("mysql: %p", mysql));
if (mysql) /* Some simple safety */
{
@@ -4066,7 +4066,7 @@ int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
{
DBUG_ENTER("mysql_real_query");
- DBUG_PRINT("enter",("handle: 0x%lx", (long) mysql));
+ DBUG_PRINT("enter",("handle: %p", mysql));
DBUG_PRINT("query",("Query = '%-.4096s'",query));
if (mysql_send_query(mysql,query,length))