|
|
7a5573f |
Fix unportable usage associated with va_list arguments. Passing "0" to
|
|
|
7a5573f |
a va_list argument only works if va_list is an integer or pointer type,
|
|
|
7a5573f |
which is not required by the C spec, and is not true on ARM for instance.
|
|
|
7a5573f |
Per bug #744707.
|
|
|
7a5573f |
|
|
|
7a5573f |
|
|
|
7a5573f |
diff -up mysql-5.5.28/sql-common/client_plugin.c.p12 mysql-5.5.28/sql-common/client_plugin.c
|
|
|
7a5573f |
--- mysql-5.5.28/sql-common/client_plugin.c.p12 2012-08-29 10:50:46.000000000 +0200
|
|
|
7a5573f |
+++ mysql-5.5.28/sql-common/client_plugin.c 2012-12-06 14:22:54.494857607 +0100
|
|
|
7a5573f |
@@ -233,11 +233,13 @@ int mysql_client_plugin_init()
|
|
|
7a5573f |
{
|
|
|
7a5573f |
MYSQL mysql;
|
|
|
7a5573f |
struct st_mysql_client_plugin **builtin;
|
|
|
7a5573f |
+ va_list unused;
|
|
|
7a5573f |
|
|
|
7a5573f |
if (initialized)
|
|
|
7a5573f |
return 0;
|
|
|
7a5573f |
|
|
|
7a5573f |
bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
|
|
|
7a5573f |
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
|
|
|
7a5573f |
|
|
|
7a5573f |
pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
|
|
|
7a5573f |
init_alloc_root(&mem_root, 128, 128);
|
|
|
7a5573f |
@@ -249,7 +251,7 @@ int mysql_client_plugin_init()
|
|
|
7a5573f |
pthread_mutex_lock(&LOCK_load_client_plugin);
|
|
|
7a5573f |
|
|
|
7a5573f |
for (builtin= mysql_client_builtins; *builtin; builtin++)
|
|
|
7a5573f |
- add_plugin(&mysql, *builtin, 0, 0, 0);
|
|
|
7a5573f |
+ add_plugin(&mysql, *builtin, 0, 0, unused);
|
|
|
7a5573f |
|
|
|
7a5573f |
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
|
|
7a5573f |
|
|
|
7a5573f |
@@ -293,9 +295,13 @@ struct st_mysql_client_plugin *
|
|
|
7a5573f |
mysql_client_register_plugin(MYSQL *mysql,
|
|
|
7a5573f |
struct st_mysql_client_plugin *plugin)
|
|
|
7a5573f |
{
|
|
|
7a5573f |
+ va_list unused;
|
|
|
7a5573f |
+
|
|
|
7a5573f |
if (is_not_initialized(mysql, plugin->name))
|
|
|
7a5573f |
return NULL;
|
|
|
7a5573f |
|
|
|
7a5573f |
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
|
|
|
7a5573f |
+
|
|
|
7a5573f |
pthread_mutex_lock(&LOCK_load_client_plugin);
|
|
|
7a5573f |
|
|
|
7a5573f |
/* make sure the plugin wasn't loaded meanwhile */
|
|
|
7a5573f |
@@ -307,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysq
|
|
|
7a5573f |
plugin= NULL;
|
|
|
7a5573f |
}
|
|
|
7a5573f |
else
|
|
|
7a5573f |
- plugin= add_plugin(mysql, plugin, 0, 0, 0);
|
|
|
7a5573f |
+ plugin= add_plugin(mysql, plugin, 0, 0, unused);
|
|
|
7a5573f |
|
|
|
7a5573f |
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
|
|
7a5573f |
return plugin;
|