[PATCH libXi 2/2] Fix const compiler warnings

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 6 20:38:13 PST 2012


XExtInt.c:80:38: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]
XExtInt.c:150:5: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]
XExtInt.c:151:5: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]
XExtInt.c:152:5: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]
XExtInt.c:153:5: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]
XExtInt.c:154:5: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/XExtInt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/XExtInt.c b/src/XExtInt.c
index fd1ae6c..1c668c7 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -77,7 +77,7 @@ int copy_classes(XIDeviceInfo *to, xXIAnyInfo* from, int *nclasses);
 int size_classes(xXIAnyInfo* from, int nclasses);
 
 static XExtensionInfo *xinput_info;
-static /* const */ char *xinput_extension_name = INAME;
+static const char *xinput_extension_name = INAME;
 
 static int XInputClose(
     Display *		/* dpy */,
@@ -143,7 +143,7 @@ static /* const */ XExtensionHooks xinput_extension_hooks = {
     XInputError,	/* error_string */
 };
 
-static char *XInputErrorList[] = {
+static const char *XInputErrorList[] = {
     "BadDevice, invalid or uninitialized input device",	/* BadDevice */
     "BadEvent, invalid event type",	/* BadEvent */
     "BadMode, invalid mode parameter",	/* BadMode  */
-- 
1.7.11.7



More information about the xorg-devel mailing list