different sign warning in libX11

Thomas Klausner wiz at NetBSD.org
Sun Mar 30 07:16:07 PDT 2014


Hi!

clang's unhappy:

src/ModMap.c:86:15: error: passing 'KeyCode *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different
sign [-Werror,-Wpointer-sign]
    Data(dpy, modifier_map->modifiermap, mapSize);
              ^~~~~~~~~~~~~~~~~~~~~~~~~
/archive/build/amd64.clang.20140330/usr/X11R7/include/X11/Xlibint.h:537:15: note: expanded from macro 'Data'
                _XSend(dpy, data, len);\
                            ^
/archive/build/amd64.clang.20140330/usr/X11R7/include/X11/Xlibint.h:923:29: note: passing argument to parameter here
    _Xconst char*       /* data */,
                                  ^
1 error generated.

Should I just cast it to (char *) or is there a better solution?
 Thomas


More information about the xorg-devel mailing list