1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Vladislav Vaintroub
2017-09-19 17:45:17 +00:00
parent de7c2e5e54
commit eba44874ca
125 changed files with 1053 additions and 1040 deletions

View File

@ -775,7 +775,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
if (global_system_variables.log_warnings > 2)
{
struct link_map *lm = (struct link_map*) plugin_dl.handle;
sql_print_information("Loaded '%s' with offset 0x%lx", dl->str, lm->l_addr);
sql_print_information("Loaded '%s' with offset 0x%zx", dl->str, (size_t)lm->l_addr);
}
#endif
@ -976,8 +976,8 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc)
*plugin= pi;
#endif
pi->ref_count++;
DBUG_PRINT("lock",("thd: 0x%lx plugin: \"%s\" LOCK ref_count: %d",
(long) current_thd, pi->name.str, pi->ref_count));
DBUG_PRINT("lock",("thd: %p plugin: \"%s\" LOCK ref_count: %d",
current_thd, pi->name.str, pi->ref_count));
if (lex)
insert_dynamic(&lex->plugins, (uchar*)&plugin);
@ -1338,8 +1338,8 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin)
DBUG_ASSERT(pi->ref_count);
pi->ref_count--;
DBUG_PRINT("lock",("thd: 0x%lx plugin: \"%s\" UNLOCK ref_count: %d",
(long) current_thd, pi->name.str, pi->ref_count));
DBUG_PRINT("lock",("thd: %p plugin: \"%s\" UNLOCK ref_count: %d",
current_thd, pi->name.str, pi->ref_count));
if (pi->state == PLUGIN_IS_DELETED && !pi->ref_count)
reap_needed= true;
@ -3243,8 +3243,8 @@ static void plugin_vars_free_values(sys_var *vars)
{
/* Free the string from global_system_variables. */
char **valptr= (char**) piv->real_value_ptr(NULL, OPT_GLOBAL);
DBUG_PRINT("plugin", ("freeing value for: '%s' addr: 0x%lx",
var->name.str, (long) valptr));
DBUG_PRINT("plugin", ("freeing value for: '%s' addr: %p",
var->name.str, valptr));
my_free(*valptr);
*valptr= NULL;
}