From cdc64c448df49676c96f87d106af8de0c467651f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 May 2006 07:32:17 +0000 Subject: r15853: started the process of removing the warnings now that talloc_set_destructor() is type safe. The end result will be lots less use of void*, and less calls to talloc_get_type() (This used to be commit 6b4c085b862c0932b80b93e316396a53b993544c) --- source4/gtk/common/gtk_events.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source4/gtk/common') diff --git a/source4/gtk/common/gtk_events.c b/source4/gtk/common/gtk_events.c index 9a0af5fdeb..67467b87a7 100644 --- a/source4/gtk/common/gtk_events.c +++ b/source4/gtk/common/gtk_events.c @@ -34,7 +34,7 @@ */ static struct event_context *gtk_event_context_global; -static int gtk_event_context_destructor(void *ptr) +static int gtk_event_context_destructor(struct event_context *ev) { gtk_event_context_global = NULL; return 0; @@ -83,9 +83,8 @@ static gboolean gtk_event_fd_handler(GIOChannel *source, GIOCondition condition, /* destroy an fd_event */ -static int gtk_event_fd_destructor(void *ptr) +static int gtk_event_fd_destructor(struct fd_event *fde) { - struct fd_event *fde = talloc_get_type(ptr, struct fd_event); struct gtk_fd_event *gtk_fd = talloc_get_type(fde->additional_data, struct gtk_fd_event); @@ -212,9 +211,8 @@ struct gtk_timed_event { /* destroy a timed event */ -static int gtk_event_timed_destructor(void *ptr) +static int gtk_event_timed_destructor(struct timed_event *te) { - struct timed_event *te = talloc_get_type(ptr, struct timed_event); struct gtk_timed_event *gtk_te = talloc_get_type(te->additional_data, struct gtk_timed_event); @@ -223,7 +221,7 @@ static int gtk_event_timed_destructor(void *ptr) return 0; } -static int gtk_event_timed_deny_destructor(void *ptr) +static int gtk_event_timed_deny_destructor(struct timed_event *te) { return -1; } -- cgit