(mframe): Add a proper casting.
authorhanda <handa>
Thu, 29 Mar 2007 11:26:14 +0000 (11:26 +0000)
committerhanda <handa>
Thu, 29 Mar 2007 11:26:14 +0000 (11:26 +0000)
src/m17n-gui.c

index fd3569d..c0bd14a 100644 (file)
@@ -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 ());