Blame SOURCES/mysql-va-list.patch

6f9931
Fix unportable usage associated with va_list arguments.  Passing "0" to
6f9931
a va_list argument only works if va_list is an integer or pointer type,
6f9931
which is not required by the C spec, and is not true on ARM for instance.
6f9931
Per bug #744707.
6f9931
6f9931
6f9931
diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/client_plugin.c
6f9931
--- mysql-5.5.16.orig/sql-common/client_plugin.c	2011-09-09 11:56:39.000000000 -0400
6f9931
+++ mysql-5.5.16/sql-common/client_plugin.c	2011-10-16 23:00:00.708799138 -0400
015dab
@@ -233,11 +233,13 @@
6f9931
 {
6f9931
   MYSQL mysql;
6f9931
   struct st_mysql_client_plugin **builtin;
6f9931
+  va_list unused;
6f9931
 
6f9931
   if (initialized)
6f9931
     return 0;
6f9931
 
6f9931
   bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
6f9931
+  bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
6f9931
 
6f9931
   pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
6f9931
   init_alloc_root(&mem_root, 128, 128);
015dab
@@ -249,7 +251,7 @@
6f9931
   pthread_mutex_lock(&LOCK_load_client_plugin);
6f9931
 
6f9931
   for (builtin= mysql_client_builtins; *builtin; builtin++)
6f9931
-    add_plugin(&mysql, *builtin, 0, 0, 0);
6f9931
+    add_plugin(&mysql, *builtin, 0, 0, unused);
6f9931
 
6f9931
   pthread_mutex_unlock(&LOCK_load_client_plugin);
6f9931
 
015dab
@@ -293,9 +295,13 @@
6f9931
 mysql_client_register_plugin(MYSQL *mysql,
6f9931
                              struct st_mysql_client_plugin *plugin)
6f9931
 {
6f9931
+  va_list unused;
6f9931
+
6f9931
   if (is_not_initialized(mysql, plugin->name))
6f9931
     return NULL;
6f9931
 
6f9931
+  bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
6f9931
+
6f9931
   pthread_mutex_lock(&LOCK_load_client_plugin);
6f9931
 
6f9931
   /* make sure the plugin wasn't loaded meanwhile */
015dab
@@ -307,7 +313,7 @@
6f9931
     plugin= NULL;
6f9931
   }
6f9931
   else
6f9931
-    plugin= add_plugin(mysql, plugin, 0, 0, 0);
6f9931
+    plugin= add_plugin(mysql, plugin, 0, 0, unused);
6f9931
 
6f9931
   pthread_mutex_unlock(&LOCK_load_client_plugin);
6f9931
   return plugin;