From 33d30268b4dd7f5afe174d54f3f7e13459633348 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 1 Feb 2002 20:14:30 +0000 Subject: added some pointer casting to get rid of warnings with some compilers. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2365 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/commands.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/commands.c b/src/core/commands.c index f066d674..9764a135 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -83,7 +83,7 @@ static COMMAND_MODULE_REC *command_module_find_func(COMMAND_REC *rec, for (tmp = rec->modules; tmp != NULL; tmp = tmp->next) { COMMAND_MODULE_REC *rec = tmp->data; - if (g_slist_find(rec->signals, func) != NULL) + if (g_slist_find(rec->signals, (void *) func) != NULL) return rec; } @@ -150,7 +150,7 @@ void command_bind_to(const char *module, int pos, const char *cmd, } modrec = command_module_get(rec, module, protocol); - modrec->signals = g_slist_append(modrec->signals, func); + modrec->signals = g_slist_append(modrec->signals, (void *) func); if (func != NULL) { str = g_strconcat("command ", cmd, NULL); @@ -226,7 +226,8 @@ void command_unbind(const char *cmd, SIGNAL_FUNC func) modrec = command_module_find_func(rec, func); g_return_if_fail(modrec != NULL); - modrec->signals = g_slist_remove(modrec->signals, func); + modrec->signals = + g_slist_remove(modrec->signals, (void *) func); if (modrec->signals == NULL) command_module_destroy(rec, modrec); } @@ -764,7 +765,7 @@ static void command_module_unbind_all(COMMAND_REC *rec, for (tmp = modrec->signals; tmp != NULL; tmp = next) { next = tmp->next; - command_unbind(rec->cmd, tmp->data); + command_unbind(rec->cmd, (SIGNAL_FUNC) tmp->data); } if (g_slist_find(commands, rec) != NULL) { -- cgit v1.2.3