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 /sql/sql_lex.cc | |
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 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index f9330bc4375..4d776671ee7 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -759,7 +759,7 @@ void lex_start(THD *thd) void lex_end(LEX *lex) { DBUG_ENTER("lex_end"); - DBUG_PRINT("enter", ("lex: 0x%lx", (long) lex)); + DBUG_PRINT("enter", ("lex: %p", lex)); lex_end_stage1(lex); lex_end_stage2(lex); @@ -2594,7 +2594,7 @@ bool st_select_lex::add_gorder_to_list(THD *thd, Item *item, bool asc) bool st_select_lex::add_item_to_list(THD *thd, Item *item) { DBUG_ENTER("st_select_lex::add_item_to_list"); - DBUG_PRINT("info", ("Item: 0x%lx", (long) item)); + DBUG_PRINT("info", ("Item: %p", item)); DBUG_RETURN(item_list.push_back(item, thd->mem_root)); } @@ -4657,9 +4657,9 @@ bool LEX::set_arena_for_set_stmt(Query_arena *backup) Query_arena_memroot(mem_root_for_set_stmt, Query_arena::STMT_INITIALIZED))) DBUG_RETURN(1); - DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx", - (ulong) mem_root_for_set_stmt, - (ulong) arena_for_set_stmt)); + DBUG_PRINT("info", ("mem_root: %p arena: %p", + mem_root_for_set_stmt, + arena_for_set_stmt)); thd->set_n_backup_active_arena(arena_for_set_stmt, backup); DBUG_RETURN(0); } @@ -4670,9 +4670,9 @@ void LEX::reset_arena_for_set_stmt(Query_arena *backup) DBUG_ENTER("LEX::reset_arena_for_set_stmt"); DBUG_ASSERT(arena_for_set_stmt); thd->restore_active_arena(arena_for_set_stmt, backup); - DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx", - (ulong) arena_for_set_stmt->mem_root, - (ulong) arena_for_set_stmt)); + DBUG_PRINT("info", ("mem_root: %p arena: %p", + arena_for_set_stmt->mem_root, + arena_for_set_stmt)); DBUG_VOID_RETURN; } @@ -4682,9 +4682,9 @@ void LEX::free_arena_for_set_stmt() DBUG_ENTER("LEX::free_arena_for_set_stmt"); if (!arena_for_set_stmt) return; - DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx", - (ulong) arena_for_set_stmt->mem_root, - (ulong) arena_for_set_stmt)); + DBUG_PRINT("info", ("mem_root: %p arena: %p", + arena_for_set_stmt->mem_root, + arena_for_set_stmt)); arena_for_set_stmt->free_items(); delete(arena_for_set_stmt); free_root(mem_root_for_set_stmt, MYF(MY_KEEP_PREALLOC)); |