Commit 785517df authored by Sergei Golubchik's avatar Sergei Golubchik

lp:700982 - Non-portable code in client plugin (fails on ARM).

don't pass NULL as an argument where va_list is expected.
parent 603444bc
...@@ -239,6 +239,8 @@ int mysql_client_plugin_init() ...@@ -239,6 +239,8 @@ int mysql_client_plugin_init()
{ {
MYSQL mysql; MYSQL mysql;
struct st_mysql_client_plugin **builtin; struct st_mysql_client_plugin **builtin;
va_list unused;
LINT_INIT_STRUCT(unused);
if (initialized) if (initialized)
return 0; return 0;
...@@ -255,7 +257,7 @@ int mysql_client_plugin_init() ...@@ -255,7 +257,7 @@ int mysql_client_plugin_init()
pthread_mutex_lock(&LOCK_load_client_plugin); pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++) 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); pthread_mutex_unlock(&LOCK_load_client_plugin);
...@@ -301,6 +303,9 @@ struct st_mysql_client_plugin * ...@@ -301,6 +303,9 @@ struct st_mysql_client_plugin *
mysql_client_register_plugin(MYSQL *mysql, mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin) struct st_mysql_client_plugin *plugin)
{ {
va_list unused;
LINT_INIT_STRUCT(unused);
if (is_not_initialized(mysql, plugin->name)) if (is_not_initialized(mysql, plugin->name))
return NULL; return NULL;
...@@ -315,7 +320,7 @@ mysql_client_register_plugin(MYSQL *mysql, ...@@ -315,7 +320,7 @@ mysql_client_register_plugin(MYSQL *mysql,
plugin= NULL; plugin= NULL;
} }
else else
plugin= add_plugin(mysql, plugin, 0, 0, 0); plugin= add_plugin(mysql, plugin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin); pthread_mutex_unlock(&LOCK_load_client_plugin);
return plugin; return plugin;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment