diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-19 17:45:17 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 17:20:46 +0000 |
commit | eba44874ca9fc317696630cb371623142289fa99 (patch) | |
tree | f67cd5dbcaf102abef2fb26f76357d14feaded04 /libmysqld | |
parent | de7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff) | |
download | mariadb-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 'libmysqld')
-rw-r--r-- | libmysqld/libmysql.c | 8 | ||||
-rw-r--r-- | libmysqld/libmysqld.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c index d06b32b0625..e610d239fa4 100644 --- a/libmysqld/libmysql.c +++ b/libmysqld/libmysql.c @@ -2053,9 +2053,9 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) { NET *net= &stmt->mysql->net; DBUG_ENTER("store_param"); - DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d", + DBUG_PRINT("enter",("type: %d buffer:%p length: %lu is_null: %d", param->buffer_type, - (long) (param->buffer ? param->buffer : NullS), + param->buffer, *param->length, *param->is_null)); if (*param->is_null) @@ -2979,8 +2979,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, MYSQL_BIND *param; DBUG_ENTER("mysql_stmt_send_long_data"); DBUG_ASSERT(stmt != 0); - DBUG_PRINT("enter",("param no: %d data: 0x%lx, length : %ld", - param_number, (long) data, length)); + DBUG_PRINT("enter",("param no: %d data: %p, length : %ld", + param_number, data, length)); /* We only need to check for stmt->param_count, if it's not null diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 36728cf573c..d1771a09578 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -205,7 +205,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, } } - DBUG_PRINT("exit",("Mysql handler: 0x%lx", (long) mysql)); + DBUG_PRINT("exit",("Mysql handler: %p", mysql)); DBUG_RETURN(mysql); error: |