diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-01-20 12:59:47 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-01-20 12:59:47 +0100 |
commit | 785517dfe633c76221ea741d8c2280f8a62dd299 (patch) | |
tree | 800168a5bcb21d5a9dc1fb43ae344fde9e2e638e /sql-common/client_plugin.c | |
parent | 603444bc13a0ddc3f98318c78da394908e06025c (diff) | |
download | mariadb-git-785517dfe633c76221ea741d8c2280f8a62dd299.tar.gz |
lp:700982 - Non-portable code in client plugin (fails on ARM).
don't pass NULL as an argument where va_list is expected.
Diffstat (limited to 'sql-common/client_plugin.c')
-rw-r--r-- | sql-common/client_plugin.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index c609f165d1c..9b28bff7937 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -239,6 +239,8 @@ int mysql_client_plugin_init() { MYSQL mysql; struct st_mysql_client_plugin **builtin; + va_list unused; + LINT_INIT_STRUCT(unused); if (initialized) return 0; @@ -255,7 +257,7 @@ int mysql_client_plugin_init() pthread_mutex_lock(&LOCK_load_client_plugin); for (builtin= mysql_client_builtins; *builtin; builtin++) - add_plugin(&mysql, *builtin, 0, 0, 0); + add_plugin(&mysql, *builtin, 0, 0, unused); pthread_mutex_unlock(&LOCK_load_client_plugin); @@ -301,6 +303,9 @@ struct st_mysql_client_plugin * mysql_client_register_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin) { + va_list unused; + LINT_INIT_STRUCT(unused); + if (is_not_initialized(mysql, plugin->name)) return NULL; @@ -315,7 +320,7 @@ mysql_client_register_plugin(MYSQL *mysql, plugin= NULL; } else - plugin= add_plugin(mysql, plugin, 0, 0, 0); + plugin= add_plugin(mysql, plugin, 0, 0, unused); pthread_mutex_unlock(&LOCK_load_client_plugin); return plugin; |