diff options
author | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
commit | 139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch) | |
tree | 7d77d6f1073f8090f275b30cb3f10254497da243 /sql-common/client_plugin.c | |
parent | b3f7eac5301529c2d069ebe4d0558980412af3a2 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz |
Merge with 5.2
Diffstat (limited to 'sql-common/client_plugin.c')
-rw-r--r-- | sql-common/client_plugin.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index 433942199e5..e37849d75b2 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -181,7 +181,7 @@ err2: plugin->deinit(); err1: if (dlhandle) - dlclose(dlhandle); + (void)dlclose(dlhandle); set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), plugin->name, errmsg); @@ -240,6 +240,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; @@ -256,7 +258,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); @@ -286,7 +288,7 @@ void mysql_client_plugin_deinit() if (p->plugin->deinit) p->plugin->deinit(); if (p->dlhandle) - dlclose(p->dlhandle); + (void)dlclose(p->dlhandle); } bzero(&plugin_list, sizeof(plugin_list)); @@ -302,6 +304,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; @@ -316,7 +321,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; @@ -361,7 +366,7 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, if (!(sym= dlsym(dlhandle, plugin_declarations_sym))) { errmsg= "not a plugin"; - dlclose(dlhandle); + (void)dlclose(dlhandle); goto err; } |