From: handa Date: Thu, 29 Mar 2007 11:26:14 +0000 (+0000) Subject: (mframe): Add a proper casting. X-Git-Tag: FLT-base~106 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=041fc41c9e63b296ed698099e80c55334f9d78b5;p=m17n%2Fm17n-lib.git (mframe): Add a proper casting. --- diff --git a/src/m17n-gui.c b/src/m17n-gui.c index fd3569d..c0bd14a 100644 --- a/src/m17n-gui.c +++ b/src/m17n-gui.c @@ -655,13 +655,12 @@ mframe (MPlist *plist) if (! interface->handle) { if (! (interface->handle = dlopen (interface->library, RTLD_NOW)) - || ! (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")) + || ! (*(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) () < 0) { fprintf (stderr, "%s\n", (char *) dlerror ());