From 7e297ecfa4db2c7ab720a63c7764bc0e20f8058c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 9 Sep 2007 19:34:30 +0000 Subject: r25047: Fix more warnings. (This used to be commit 69de86d2d2e49439760fbc61901eb87fb7fc5d55) --- source4/lib/messaging/messaging.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/lib/messaging') diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 2ad5e3bed0..e398b16d72 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -137,7 +137,8 @@ static void messaging_dispatch(struct messaging_context *msg, struct messaging_r /* temporary IDs use an idtree, the rest use a array of pointers */ if (rec->header->msg_type >= MSG_TMP_BASE) { - d = idr_find(msg->dispatch_tree, rec->header->msg_type); + d = (struct dispatch_fn *)idr_find(msg->dispatch_tree, + rec->header->msg_type); } else if (rec->header->msg_type < msg->num_types) { d = msg->dispatch[rec->header->msg_type]; } else { @@ -417,7 +418,8 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void struct dispatch_fn *d, *next; if (msg_type >= msg->num_types) { - d = idr_find(msg->dispatch_tree, msg_type); + d = (struct dispatch_fn *)idr_find(msg->dispatch_tree, + msg_type); if (!d) return; idr_remove(msg->dispatch_tree, msg_type); talloc_free(d); @@ -666,7 +668,7 @@ static void irpc_handler_reply(struct messaging_context *msg_ctx, struct irpc_me { struct irpc_request *irpc; - irpc = idr_find(msg_ctx->idr, m->header.callid); + irpc = (struct irpc_request *)idr_find(msg_ctx->idr, m->header.callid); if (irpc == NULL) return; /* parse the reply data */ -- cgit