From f16dd6af3eb17a25b8ee03d6617a7acc6e919fb0 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Thu, 29 Jan 2009 20:22:21 -0200 Subject: patches to avoid gcc warnings for libX11 (#3) Author is Peter Breitenlohner Bug #17946, attachment #19441 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. --- modules/im/ximcp/imRm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c index 73f60206..9cdda3f7 100644 --- a/modules/im/ximcp/imRm.c +++ b/modules/im/ximcp/imRm.c @@ -410,7 +410,7 @@ _XimDefaultIMValues( = (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 @@ _XimDefaultICValues( = (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]; } } -- cgit v1.2.1