From: Panu Matilainen Date: Tue, 19 Apr 2011 07:21:26 +0000 (+0300) Subject: Eliminate unused variable in rpmpluginsAdd() X-Git-Tag: tznext/4.11.0.1.tizen20130304~1200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92ccb5f822c6b8889dbb784182f5da82f88f6102;p=tools%2Flibrpm-tizen.git 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. --- 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);