From: handa Date: Thu, 30 Oct 2008 02:45:46 +0000 (+0000) Subject: (mframe): Fix strict aliasing bug. X-Git-Tag: XML-base~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=81e4da1532521c68d48f0e99e9e83d60c37bd2d1;p=m17n%2Fm17n-lib.git (mframe): Fix strict aliasing bug. --- diff --git a/src/m17n-gui.c b/src/m17n-gui.c index 2b31927..66b9f2a 100644 --- a/src/m17n-gui.c +++ b/src/m17n-gui.c @@ -657,12 +657,13 @@ mframe (MPlist *plist) if (! interface->handle) { if (! (interface->handle = dlopen (interface->library, RTLD_NOW)) - || ! (*(void **) (&interface->init) - = dlsym (interface->handle, "device_init")) - || ! (*(void **) (&interface->open) - = dlsym (interface->handle, "device_open")) - || ! (*(void **) (&interface->fini) - = dlsym (interface->handle, "device_fini")) + || ! (interface->init + = (int (*) ()) dlsym (interface->handle, "device_init")) + || ! (interface->open + = (int (*) (MFrame *, MPlist *)) dlsym (interface->handle, + "device_open")) + || ! (interface->fini + = (int (*) ()) dlsym (interface->handle, "device_fini")) || (*interface->init) () < 0) { fprintf (stderr, "%s\n", (char *) dlerror ());