diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-10 11:19:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-10 11:19:25 +0300 |
commit | c11e5cdd12a6ffbc3c95e0abff6cc86920d592fa (patch) | |
tree | 1f860a1e1cb620fa9a71c99967bb19d64a8c2a3c /sql-common | |
parent | 62dce14d156ff99836a23f5ccadcfaa19cf11f8a (diff) | |
parent | cf71cc838e608b4a4b8ae2557d4957ecb9bef97a (diff) | |
download | mariadb-git-c11e5cdd12a6ffbc3c95e0abff6cc86920d592fa.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client_plugin.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index 4faf05847d8..af86b19f309 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -28,11 +28,6 @@ There is no reference counting and no unloading either. */ -#if defined(_MSC_VER) -/* Silence warnings about variable 'unused' being used. */ -#define FORCE_INIT_OF_VARS 1 -#endif - #include <my_global.h> #include "mysql.h" #include <my_sys.h> @@ -243,12 +238,12 @@ int mysql_client_plugin_init() struct st_mysql_client_plugin **builtin; va_list unused; DBUG_ENTER("mysql_client_plugin_init"); - LINT_INIT_STRUCT(unused); if (initialized) DBUG_RETURN(0); bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ + bzero(&unused, sizeof unused); mysql_mutex_init(0, &LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); init_alloc_root(&mem_root, "client_plugin", 128, 128, MYF(0)); @@ -306,9 +301,7 @@ struct st_mysql_client_plugin * mysql_client_register_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin) { - va_list unused; DBUG_ENTER("mysql_client_register_plugin"); - LINT_INIT_STRUCT(unused); if (is_not_initialized(mysql, plugin->name)) DBUG_RETURN(NULL); @@ -324,7 +317,11 @@ mysql_client_register_plugin(MYSQL *mysql, plugin= NULL; } else + { + va_list unused; + bzero(&unused, sizeof unused); plugin= add_plugin(mysql, plugin, 0, 0, unused); + } mysql_mutex_unlock(&LOCK_load_client_plugin); DBUG_RETURN(plugin); |