--- uim/anthy.c +++ uim/anthy.c @@ -93,16 +93,16 @@ dlclose(api.diclib); return -1; } - *(int **)(&api.init) = dlsym(api.lib, "anthy_init"); - *(int **)(&api.quit) = dlsym(api.lib, "anthy_quit"); - *(struct anthy_context **)(&api.create_context) = dlsym(api.lib, "anthy_create_context"); - *(void **)(&api.release_context) = dlsym(api.lib, "anthy_release_context"); - *(void **)(&api.set_string) = dlsym(api.lib, "anthy_set_string"); - *(void **)(&api.get_stat) = dlsym(api.lib, "anthy_get_stat"); - *(void **)(&api.get_segment_stat) = dlsym(api.lib, "anthy_get_segment_stat"); - *(int **)(&api.get_segment) = dlsym(api.lib, "anthy_get_segment"); - *(void **)(&api.resize_segment) = dlsym(api.lib, "anthy_resize_segment"); - *(void **)(&api.commit_segment) = dlsym(api.lib, "anthy_commit_segment"); + api.init = (int (*)(void))dlsym(api.lib, "anthy_init"); + api.quit = (int (*)(void))dlsym(api.lib, "anthy_quit"); + api.create_context = (struct anthy_context *(*)(void))dlsym(api.lib, "anthy_create_context"); + api.release_context = (void (*)(struct anthy_context *))dlsym(api.lib, "anthy_release_context"); + api.set_string = (void (*)(struct anthy_context *, char *))dlsym(api.lib, "anthy_set_string"); + api.get_stat = (void (*)(struct anthy_context *, struct anthy_conv_stat *))dlsym(api.lib, "anthy_get_stat"); + api.get_segment_stat = (void (*)(struct anthy_context *, int, struct anthy_segment_stat *))dlsym(api.lib, "anthy_get_segment_stat"); + api.get_segment = (int (*)(struct anthy_context *, int, int, char *, int))dlsym(api.lib, "anthy_get_segment"); + api.resize_segment = (void (*)(struct anthy_context *, int, int))dlsym(api.lib, "anthy_resize_segment"); + api.commit_segment = (void (*)(struct anthy_context *, int, int))dlsym(api.lib, "anthy_commit_segment"); if (api.init && api.quit && api.create_context && --- xim/connection.cpp +++ xim/connection.cpp @@ -216,13 +216,13 @@ int format; unsigned long nrItems; unsigned long remain; - char *data; + unsigned char *data; do { XGetWindowProperty(XimServer::gDpy, ev->window, ev->data.l[1], offset, BUF_SIZE - mBuf.len, True, AnyPropertyType, &type, &format, &nrItems, &remain, - (unsigned char **)&data); + &data); if (!data) return false; --- xim/ximserver.cpp +++ xim/ximserver.cpp @@ -191,20 +191,20 @@ Atom type; int format; unsigned long nr_prop, nr_bytes; - Atom *prop; + unsigned char *prop; int mode = PropModePrepend; int valuechange = 1; XGetWindowProperty(XimServer::gDpy, DefaultRootWindow(XimServer::gDpy), xim_servers, 0, 8192 ,False, XA_ATOM, &type, &format, - &nr_prop, &nr_bytes, (unsigned char **)&prop); + &nr_prop, &nr_bytes, &prop); int i; if (type != XA_ATOM || format != 32) mode = PropModeReplace; else { for (i = 0; i < (int)nr_prop; i++) { - if (prop[i] == mServerAtom) { + if (((Atom *)prop)[i] == mServerAtom) { mode = PropModeAppend; valuechange = 0; break;