From 81e4da1532521c68d48f0e99e9e83d60c37bd2d1 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 30 Oct 2008 02:45:46 +0000 Subject: [PATCH] (mframe): Fix strict aliasing bug. --- src/m17n-gui.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 ()); -- 1.7.10.4