[Commits] Rev 2916: lp:700982 - Non-portable code in client plugin (fails on ARM). in http://bazaar.launchpad.net/~maria-captains/maria/5.2/

serg at askmonty.org serg at askmonty.org
Thu Jan 20 19:44:49 EET 2011


At http://bazaar.launchpad.net/~maria-captains/maria/5.2/

------------------------------------------------------------
revno: 2916
revision-id: sergii at pisem.net-20110120115947-r5ysqaz9fee1z396
parent: sergii at pisem.net-20110112111121-6795co2l6ybxcwsn
fixes bug(s): https://launchpad.net/bugs/700982
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.2
timestamp: Thu 2011-01-20 12:59:47 +0100
message:
  lp:700982 - Non-portable code in client plugin (fails on ARM).
  don't pass NULL as an argument where va_list is expected.
-------------- next part --------------
=== modified file 'sql-common/client_plugin.c'
--- a/sql-common/client_plugin.c	2010-03-29 15:13:53 +0000
+++ b/sql-common/client_plugin.c	2011-01-20 11:59:47 +0000
@@ -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 *mysq
     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;



More information about the commits mailing list