summaryrefslogtreecommitdiff
path: root/src/common/HPM.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-08-25 18:10:16 +0200
committerHaru <haru@dotalux.com>2019-09-22 20:20:59 +0200
commita4c438dd57403565bf6c934605d556314f8a6a9f (patch)
treeeb977459fdd06bec14e46500989aa684d30d0fa6 /src/common/HPM.c
parent092e3205ab3be1605c6769fbf774619d13526907 (diff)
downloadhercules-a4c438dd57403565bf6c934605d556314f8a6a9f.tar.gz
hercules-a4c438dd57403565bf6c934605d556314f8a6a9f.tar.bz2
hercules-a4c438dd57403565bf6c934605d556314f8a6a9f.tar.xz
hercules-a4c438dd57403565bf6c934605d556314f8a6a9f.zip
Fix an assignment of a function pointer to a non-function pointer
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r--src/common/HPM.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index a579a0926..479135767 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -458,11 +458,12 @@ static bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, c
static struct hplugin *hplugin_load(const char *filename)
{
+ typedef void *(ImportSymbolFunc)(char *, unsigned int);
struct hplugin *plugin;
struct hplugin_info *info;
struct HPMi_interface **HPMi;
bool anyEvent = false;
- void **import_symbol_ref;
+ ImportSymbolFunc **import_symbol_ref;
int *HPMDataCheckVer;
unsigned int *HPMDataCheckLen;
struct s_HPMDataCheck *HPMDataCheck;
@@ -499,7 +500,7 @@ static struct hplugin *hplugin_load(const char *filename)
plugin->info = info;
plugin->filename = aStrdup(filename);
- if( !( import_symbol_ref = plugin_import(plugin->dll, "import_symbol",void **) ) ) {
+ if ((import_symbol_ref = plugin_import(plugin->dll, "import_symbol", ImportSymbolFunc **)) == NULL) {
ShowFatalError("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
exit(EXIT_FAILURE);
}