Eliminate unused variable in rpmpluginsAdd()
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 19 Apr 2011 07:21:26 +0000 (10:21 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 19 Apr 2011 07:21:26 +0000 (10:21 +0300)
- 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

index e34019a..9098aa5 100644 (file)
@@ -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);