From: Zoltan B. <zb...@du...> - 2005-07-03 21:30:47
|
Hi, here's the next part. Changelog: *********************************************************** Silence warnings in datasource.c. The original code gave these kinds of warnings on GCC4: warning: ISO C forbids conversion of function pointer to object pointer t= ype warning: ISO C forbids initialization between function pointer and 'void = *' warning: ISO C forbids assignment between function pointer and 'void *' The above warnings sound serious but on the other hand, explicitly casting the address of a function pointer to a (gpointer *) gave this warning on older GCCs: warning: dereferencing type-punned pointer will break strict-aliasing rul= es Aliasing function pointers to gpointer using unions solves this, using union { gpointer ptr; void (*function)(void); } allows the assignment to the gpointer and calling function() without warnings. *********************************************************** Best regards, Zolt=E1n B=F6sz=F6rm=E9nyi |