From: Zoltan B. <zb...@du...> - 2005-07-03 21:32:23
|
Zoltan Boszormenyi =EDrta: > Sorry, it went to the rlib-users list. And now with the attachment. :-( >=20 > Zoltan Boszormenyi =EDrta: >=20 >> 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=20 >> pointer type >> warning: ISO C forbids initialization between function pointer and=20 >> '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=20 >> rules >> 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 >=20 >=20 >=20 |