https://bugs.freedesktop.org/show_bug.cgi?id=110709
Bug ID: 110709
Summary: g_glxglvnddispatchfuncs.c and glxglvnd.c fail to build
with clang 8.0
Product: Mesa
Version: 19.1
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: GLX
Assignee: mesa-dev@lists.freedesktop.org
Reporter: b...@lindev.ch
QA Contact: mesa-dev@lists.freedesktop.org
Trying to build mesa 19.1.0-rc2 with clang 8.0 results in
../src/glx/g_glxglvnddispatchfuncs.c:146:47: error: passing 'const int *' to
parameter of type 'int *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
ret = (*pChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
^~~~~~~~~~~
../src/glx/g_glxglvnddispatchfuncs.c:237:64: error: passing 'const int *' to
parameter of type 'int *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
ret = (*pCreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
^~~~~~~~~~~
2 errors generated.
After "fixing" this by explicitly casting attrib_list to (int*), a similar
error occurs in glxglvnd.c:
../src/glx/glxglvnd.c:44:12: error: returning 'const void *const' from a
function with result type 'void *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
return __glXDispatchFunctions[internalIndex];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
This, too, can be "fixed" with an explicit cast to void* -- but of course
that's just hiding const-ness being thrown away.
The resulting mesa works fine.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev