From 3ea4c3bfe12e488c41f241a2d9ad06260cae66e4 Mon Sep 17 00:00:00 2001 From: schnetter Date: Thu, 4 Aug 2005 14:31:59 +0000 Subject: Do not cast t_reduce_operator** to void** -- this is illegal in C, because it may lead to writing a t_reduce_operator* into a void*, and these may have different sizes. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4103 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/comm/Reduction.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/comm') diff --git a/src/comm/Reduction.c b/src/comm/Reduction.c index ac59c265..ce29f62f 100644 --- a/src/comm/Reduction.c +++ b/src/comm/Reduction.c @@ -228,12 +228,13 @@ int CCTKi_RegisterReductionOperator(const char *thorn, const char *name) { int handle; + void *tmp; t_reduce_operator *reduce_operator; /* Check that the method hasn't already been registered */ - handle = Util_GetHandle(ReductionOperators, name, - (void **) &reduce_operator); + handle = Util_GetHandle(ReductionOperators, name, &tmp); + reduce_operator = tmp; if(handle < 0) { reduce_operator = malloc (sizeof (t_reduce_operator)); -- cgit v1.2.3