[ircd-ratbox] [PATCH] ratbox-services CVS 20050517: gcc 4.1
20050515
Jilles Tjoelker
jilles at stack.nl
Wed May 18 07:12:08 EDT 2005
On Tue, May 17, 2005 at 08:14:10PM +0200, Ralf S. Engelschall wrote:
> Yes, you're right, on some platforms data and code pointers have
> different sizes. I totally forgot this for a while. But how to shut up
> the GCC warnings? The only alternative AFAIK is to let ratbox-services
> internally always use a real function pointer (usually a generic
> "void(*)(void)") instead of a void pointer ("void *") and cast only from
> the generic function pointer to the actual one. That's the only fully
> portable and clean solution, isn't it?
Yuck too!
If you wanted to do this right, you'd have to either put a union in the
dlink stuff or allocate a structure with a function pointer in it and
put a pointer to that in the dlink.
What I would do is disabling that warning :P
--
Jilles Tjoelker
More information about the ircd-ratbox
mailing list