mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Fixed some gcc aliasing warnings
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3147 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
43b0d36ee1
commit
d6fe016c78
3 changed files with 17 additions and 10 deletions
|
|
@ -163,6 +163,7 @@ static int module_load_name(const char *path, const char *rootmodule,
|
|||
GModule *gmodule;
|
||||
MODULE_REC *module;
|
||||
MODULE_FILE_REC *rec;
|
||||
gpointer value1, value2;
|
||||
char *initfunc, *deinitfunc;
|
||||
int found;
|
||||
|
||||
|
|
@ -178,11 +179,14 @@ static int module_load_name(const char *path, const char *rootmodule,
|
|||
/* get the module's init() and deinit() functions */
|
||||
initfunc = module_get_func(rootmodule, submodule, "init");
|
||||
deinitfunc = module_get_func(rootmodule, submodule, "deinit");
|
||||
found = g_module_symbol(gmodule, initfunc, (gpointer *) &module_init) &&
|
||||
g_module_symbol(gmodule, deinitfunc, (gpointer *) &module_deinit);
|
||||
found = g_module_symbol(gmodule, initfunc, &value1) &&
|
||||
g_module_symbol(gmodule, deinitfunc, &value2);
|
||||
g_free(initfunc);
|
||||
g_free(deinitfunc);
|
||||
|
||||
module_init = value1;
|
||||
module_deinit = value2;
|
||||
|
||||
if (!found) {
|
||||
module_error(MODULE_ERROR_INVALID, NULL,
|
||||
rootmodule, submodule);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue