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/opt_range.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/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index c15810ba686..f8f1d0a3efd 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1321,7 +1321,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() file->ha_end_keyread(); if (free_file) { - DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file, + DBUG_PRINT("info", ("Freeing separate handler %p (free: %d)", file, free_file)); file->ha_external_lock(current_thd, F_UNLCK); file->ha_close(); @@ -1483,7 +1483,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, in_ror_merged_scan= 1; if (reuse_handler) { - DBUG_PRINT("info", ("Reusing handler 0x%lx", (long) file)); + DBUG_PRINT("info", ("Reusing handler %p", file)); if (init()) { DBUG_RETURN(1); @@ -10217,7 +10217,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root) ulong count=count_key_part_usage(root,pos->next_key_part); if (count > pos->next_key_part->use_count) { - sql_print_information("Use_count: Wrong count for key at 0x%lx, %lu " + sql_print_information("Use_count: Wrong count for key at %p, %lu " "should be %lu", (long unsigned int)pos, pos->next_key_part->use_count, count); return; @@ -10226,7 +10226,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root) } } if (e_count != elements) - sql_print_warning("Wrong use count: %u (should be %u) for tree at 0x%lx", + sql_print_warning("Wrong use count: %u (should be %u) for tree at %p", e_count, elements, (long unsigned int) this); } #endif @@ -14612,7 +14612,7 @@ static void print_sel_tree(PARAM *param, SEL_TREE *tree, key_map *tree_map, if (!tmp.length()) tmp.append(STRING_WITH_LEN("(empty)")); - DBUG_PRINT("info", ("SEL_TREE: 0x%lx (%s) scans: %s", (long) tree, msg, + DBUG_PRINT("info", ("SEL_TREE: %p (%s) scans: %s", tree, msg, tmp.c_ptr_safe())); DBUG_VOID_RETURN; |