From 041fc41c9e63b296ed698099e80c55334f9d78b5 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 29 Mar 2007 11:26:14 +0000 Subject: [PATCH] (mframe): Add a proper casting. --- src/m17n-gui.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 ()); -- 1.7.10.4