diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index 9f0a009..e945bcd 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -211,7 +211,7 @@ static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n) return i == n ? GL_TRUE : GL_FALSE; } -static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame1 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t')) { @@ -232,7 +232,7 @@ static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuin return GL_FALSE; } -static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame2 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { if(*na >= nb) { @@ -248,7 +248,7 @@ static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuin return GL_FALSE; } -static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +static GLboolean _glewStrSame3 (const GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) { if(*na >= nb) { diff --git a/auto/src/glew_str_glx.c b/auto/src/glew_str_glx.c index 1db8d3a..e841475 100644 --- a/auto/src/glew_str_glx.c +++ b/auto/src/glew_str_glx.c @@ -12,7 +12,7 @@ GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name) GLboolean glxewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/auto/src/glew_str_head.c b/auto/src/glew_str_head.c index ebeb48d..1e8d963 100644 --- a/auto/src/glew_str_head.c +++ b/auto/src/glew_str_head.c @@ -4,7 +4,7 @@ GLboolean GLEWAPIENTRY glewContextIsSupported (const GLEWContext* ctx, const cha GLboolean GLEWAPIENTRY glewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/auto/src/glew_str_wgl.c b/auto/src/glew_str_wgl.c index 20552bd..5463ef7 100644 --- a/auto/src/glew_str_wgl.c +++ b/auto/src/glew_str_wgl.c @@ -12,7 +12,7 @@ GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext* ctx, const c GLboolean GLEWAPIENTRY wglewIsSupported (const char* name) #endif { - GLubyte* pos = (GLubyte*)name; + const GLubyte* pos = (const GLubyte*)name; GLuint len = _glewStrLen(pos); GLboolean ret = GL_TRUE; while (ret && len > 0) diff --git a/config/Makefile.linux b/config/Makefile.linux index b460b4b..55e4a23 100644 --- a/config/Makefile.linux +++ b/config/Makefile.linux @@ -23,6 +23,7 @@ NAME = GLEW WARN = -Wall -W POPT = -O2 CFLAGS.EXTRA += -fPIC +CFLAGS.EXTRA += -Wcast-qual BIN.SUFFIX = LIB.SONAME = lib$(NAME).so.$(SO_MAJOR) LIB.DEVLNK = lib$(NAME).so