1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05: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:
Timo Sirainen 2003-11-16 17:57:44 +00:00 committed by cras
parent 43b0d36ee1
commit d6fe016c78
3 changed files with 17 additions and 10 deletions

View File

@ -133,7 +133,7 @@ void expando_add_signal(const char *key, const char *signal, ExpandoArg arg)
/* Destroy expando */
void expando_destroy(const char *key, EXPANDO_FUNC func)
{
gpointer origkey;
gpointer origkey, value;
EXPANDO_REC *rec;
g_return_if_fail(key != NULL || *key == '\0');
@ -146,8 +146,9 @@ void expando_destroy(const char *key, EXPANDO_FUNC func)
char_expandos[(int) (unsigned char) *key] = NULL;
g_free(rec);
}
} else if (g_hash_table_lookup_extended(expandos, key, &origkey,
(gpointer *) &rec)) {
} else if (g_hash_table_lookup_extended(expandos, key,
&origkey, &value)) {
rec = value;
if (rec->func == func) {
g_hash_table_remove(expandos, key);
g_free(origkey);

View File

@ -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);

View File

@ -177,10 +177,11 @@ static void uniq_destroy_str(gpointer key, gpointer value)
void module_uniq_destroy(const char *module)
{
GHashTable *idlist;
gpointer key;
gpointer key, value;
if (g_hash_table_lookup_extended(idlookup, module, &key, &value)) {
idlist = value;
if (g_hash_table_lookup_extended(idlookup, module, &key,
(gpointer *) &idlist)) {
g_hash_table_remove(idlookup, key);
g_free(key);
@ -188,8 +189,9 @@ void module_uniq_destroy(const char *module)
g_hash_table_destroy(idlist);
}
if (g_hash_table_lookup_extended(stridlookup, module, &key,
(gpointer *) &idlist)) {
if (g_hash_table_lookup_extended(stridlookup, module, &key, &value)) {
idlist = value;
g_hash_table_remove(stridlookup, key);
g_free(key);