From 6ce516929aa5cf4a3ee01a87f3910efe53c2bcc7 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 31 Aug 2005 09:36:58 +0000 Subject: [PATCH] Fixes for GCC 4.0: void * and pointer to function are not compatible anymore [r6542] --- ir/tr/tr_inheritance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir/tr/tr_inheritance.c b/ir/tr/tr_inheritance.c index b79bc3cc7..aed2e1606 100644 --- a/ir/tr/tr_inheritance.c +++ b/ir/tr/tr_inheritance.c @@ -46,7 +46,7 @@ static void copy_entities_from_superclass(type *clss, void *env) int overwritten; type *super, *inhenttype; entity *inhent, *thisent; - mangle_inherited_name_func *mfunc = (mangle_inherited_name_func *)env; + mangle_inherited_name_func *mfunc = *(mangle_inherited_name_func **)env; for(i = 0; i < get_class_n_supertypes(clss); i++) { super = get_class_supertype(clss, i); @@ -91,7 +91,7 @@ static void copy_entities_from_superclass(type *clss, void *env) void resolve_inheritance(mangle_inherited_name_func *mfunc) { if (!mfunc) mfunc = default_mangle_inherited_name; - class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)mfunc); + class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)&mfunc); } -- 2.20.1