This patch avoids the two gcc warnings ../../../../libX11-1.1.5/modules/im/ximcp/imRm.c:413: warning: assignment discards qualifiers from pointer target type ../../../../libX11-1.1.5/modules/im/ximcp/imRm.c:450: warning: assignment discards qualifiers from pointer target type Note, that this as a rather crude fix of the problem (and it is really a shame to cast name_table to non-const). The right solution would be to declare XIMValuesList.supported_values (in include/X11/Xlib.h) as 'const char **' (or '_Xconst char **'). This will, however, require extensive modifications in various places. diff -ur libX11-1.1.5.orig/modules/im/ximcp/imRm.c libX11-1.1.5/modules/im/ximcp/imRm.c --- libX11-1.1.5.orig/modules/im/ximcp/imRm.c 2008-09-04 23:35:13.000000000 +0200 +++ libX11-1.1.5/modules/im/ximcp/imRm.c 2008-10-07 15:45:02.000000000 +0200 @@ -410,7 +410,7 @@ = (char **)((char *)tmp + sizeof(XIMValuesList)); for(i = 0; i < n; i++) { values_list->supported_values[i] = - name_table + supported_local_im_values_list[i]; + (char *)name_table + supported_local_im_values_list[i]; } } @@ -447,7 +447,7 @@ = (char **)((char *)tmp + sizeof(XIMValuesList)); for(i = 0; i < n; i++) { values_list->supported_values[i] = - name_table + supported_local_ic_values_list[i]; + (char *)name_table + supported_local_ic_values_list[i]; } }