--- example/medit.c +++ example/medit.c @@ -351,11 +351,12 @@ update_scroll_bar (int from, int to) { float top = (float) from / nchars; float shown = (float) (to - from) / nchars; - XtArgVal *l_top = (XtArgVal *) ⊤ - XtArgVal *l_shown = (XtArgVal *) &shown; + union { float f; XtArgVal xav; } u; - XtSetArg (arg[0], XtNtopOfThumb, *l_top); - XtSetArg (arg[1], XtNshown, *l_shown); + u.f = top; + XtSetArg (arg[0], XtNtopOfThumb, u.xav); + u.f = shown; + XtSetArg (arg[1], XtNshown, u.xav); XtSetValues (SbarWidget, arg, 2); } @@ -1927,7 +1928,7 @@ FilterProc (Widget w, XtPointer client_d handle = dlopen (filter_module, RTLD_NOW); if (! handle) return; - *(void **) (&func) = dlsym (handle, "filter"); + func = (void (*) (MText *, int, int)) dlsym (handle, "filter"); if (func) (*func) (mt, mtext_property_start (selection), mtext_property_end (selection)); --- src/face.c +++ src/face.c @@ -1852,7 +1852,7 @@ mface_get_prop (MFace *face, MSymbol key { if (key == Mhook_func) /* This unsafe code is for backward compatiblity. */ - return *(void **) &face->hook; + return (void *) face->hook; MERROR (MERROR_FACE, NULL); } return face->property[index]; @@ -1937,9 +1937,9 @@ mface_put_prop (MFace *face, MSymbol key if (key == Mhook_func) { /* This unsafe code is for backward compatiblity. */ - if (*(void **) &face->hook == val) + if (face->hook == (MFaceHookFunc) val) return 0; - *(void **) &face->hook = val; + face->hook = (MFaceHookFunc) val; } else { --- src/m17n-gui.c +++ 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 ());