summaryrefslogtreecommitdiff
path: root/sql-common/client_plugin.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-01-20 13:00:46 +0100
committerSergei Golubchik <sergii@pisem.net>2011-01-20 13:00:46 +0100
commit7effc175cefb50a1ba6c1b034a0b255234c87595 (patch)
tree6abd4f691bb6412d6ab53cd4d0e2771181a0a5ee /sql-common/client_plugin.c
parent785517dfe633c76221ea741d8c2280f8a62dd299 (diff)
downloadmariadb-git-7effc175cefb50a1ba6c1b034a0b255234c87595.tar.gz
lp:705210 - Compiling with BUILD/compile-pentium64-debug fails
support building with -all-static (no dlopen and dlclose make few related declarations unused or "statement have no effect") and -Werror
Diffstat (limited to 'sql-common/client_plugin.c')
-rw-r--r--sql-common/client_plugin.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c
index 9b28bff7937..f33662bb222 100644
--- a/sql-common/client_plugin.c
+++ b/sql-common/client_plugin.c
@@ -50,7 +50,8 @@ struct st_client_plugin_int {
static my_bool initialized= 0;
static MEM_ROOT mem_root;
-static const char *plugin_declarations_sym= "_mysql_client_plugin_declaration_";
+static const char *plugin_declarations_sym __attribute__((unused)) =
+ "_mysql_client_plugin_declaration_";
static uint plugin_version[MYSQL_CLIENT_MAX_PLUGINS]=
{
0, /* these two are taken by Connector/C */
@@ -180,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);
@@ -287,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));
@@ -365,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;
}