From 92ccb5f822c6b8889dbb784182f5da82f88f6102 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 19 Apr 2011 10:21:26 +0300 Subject: [PATCH] Eliminate unused variable in rpmpluginsAdd() - dlsym() can return NULL without it being an error, and since we use dlerror() for determining the error anyway, supportedHooks is simply unneeded here. --- lib/rpmplugins.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rpmplugins.c b/lib/rpmplugins.c index e34019a..9098aa5 100644 --- a/lib/rpmplugins.c +++ b/lib/rpmplugins.c @@ -52,7 +52,6 @@ rpmPlugins rpmpluginsNew(rpmts ts) rpmRC rpmpluginsAdd(rpmPlugins plugins, const char *name, const char *path, const char *opts) { - rpmPluginHook *supportedHooks; char *error; void *handle = dlopen(path, RTLD_LAZY); @@ -62,7 +61,7 @@ rpmRC rpmpluginsAdd(rpmPlugins plugins, const char *name, const char *path, } /* make sure the plugin has the supported hooks flag */ - supportedHooks = (rpmPluginHook *) dlsym(handle, STR(PLUGIN_HOOKS)); + (void) dlsym(handle, STR(PLUGIN_HOOKS)); if ((error = dlerror()) != NULL) { rpmlog(RPMLOG_ERR, _("Failed to resolve symbol %s: %s\n"), STR(PLUGIN_HOOKS), error); -- 2.7.4