From a8f9d13eda525d42916c33b0a9f4b98ca84f3aab Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 22 Oct 2012 04:54:25 +0000 Subject: [PATCH] * plugin.c (plugin_load_plugins): Warning fix. --- ld/ChangeLog | 4 ++++ ld/plugin.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 25369c4c859..e16bf3d555b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2012-10-22 Alan Modra + + * plugin.c (plugin_load_plugins): Warning fix. + 2012-10-18 Kai Tietz PR binutils/14067 diff --git a/ld/plugin.c b/ld/plugin.c index 7e3d2a33ba8..8902ef4ea36 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -800,9 +800,11 @@ plugin_load_plugins (void) while (curplug) { enum ld_plugin_status rv; - ld_plugin_onload onloadfn = dlsym (curplug->dlhandle, "onload"); + ld_plugin_onload onloadfn; + + onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "onload"); if (!onloadfn) - onloadfn = dlsym (curplug->dlhandle, "_onload"); + onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload"); if (!onloadfn) return set_plugin_error (curplug->name); set_tv_plugin_args (curplug, &my_tv[tv_header_size]); -- 2.30.2