gcc 4.0 warning fixes.

This commit is contained in:
Mike McCormack 2005-08-10 09:48:58 +00:00 committed by Alexandre Julliard
parent a25f8c49b6
commit 98520ef499
2 changed files with 11 additions and 11 deletions

View File

@ -360,7 +360,7 @@ void* WINAPI wglGetProcAddress(LPCSTR lpszProc) {
if (wgl_ext_ret == NULL) { if (wgl_ext_ret == NULL) {
/* Some sanity checks :-) */ /* Some sanity checks :-) */
ENTER_GL(); ENTER_GL();
local_func = p_glXGetProcAddressARB(lpszProc); local_func = p_glXGetProcAddressARB( (const GLubyte *) lpszProc);
LEAVE_GL(); LEAVE_GL();
if (local_func != NULL) { if (local_func != NULL) {
WARN("Extension %s defined in the OpenGL library but NOT in opengl_ext.c...\n", lpszProc); WARN("Extension %s defined in the OpenGL library but NOT in opengl_ext.c...\n", lpszProc);
@ -391,7 +391,7 @@ void* WINAPI wglGetProcAddress(LPCSTR lpszProc) {
} }
} else { } else {
ENTER_GL(); ENTER_GL();
local_func = p_glXGetProcAddressARB(ext_ret->glx_name); local_func = p_glXGetProcAddressARB( (const GLubyte*) ext_ret->glx_name);
LEAVE_GL(); LEAVE_GL();
/* After that, look at the extensions defined in the Linux OpenGL library */ /* After that, look at the extensions defined in the Linux OpenGL library */
@ -762,7 +762,7 @@ const GLubyte * internal_glGetString(GLenum name) {
} }
if (NULL == internal_gl_extensions) { if (NULL == internal_gl_extensions) {
GL_Extensions = glGetString(GL_EXTENSIONS); GL_Extensions = (const char *) glGetString(GL_EXTENSIONS);
TRACE("GL_EXTENSIONS reported:\n"); TRACE("GL_EXTENSIONS reported:\n");
if (NULL == GL_Extensions) { if (NULL == GL_Extensions) {
@ -796,7 +796,7 @@ const GLubyte * internal_glGetString(GLenum name) {
} }
} }
} }
return internal_gl_extensions; return (const GLubyte *) internal_gl_extensions;
} }

View File

@ -138,9 +138,9 @@ BOOL query_function_render_texture(glXGetProcAddressARB_t proc, const char *gl_v
BOOL bTest = (0 <= strcmp("1.3", glx_version) || NULL != strstr(glx_extensions, "GLX_SGIX_pbuffer")); BOOL bTest = (0 <= strcmp("1.3", glx_version) || NULL != strstr(glx_extensions, "GLX_SGIX_pbuffer"));
if (bTest) { if (bTest) {
if (NULL != strstr(glx_extensions, "GLX_ARB_render_texture")) { if (NULL != strstr(glx_extensions, "GLX_ARB_render_texture")) {
p_glXBindTexImageARB = proc("glXBindTexImageARB"); p_glXBindTexImageARB = proc( (const GLubyte *) "glXBindTexImageARB");
p_glXReleaseTexImageARB = proc("glXReleaseTexImageARB"); p_glXReleaseTexImageARB = proc( (const GLubyte *) "glXReleaseTexImageARB");
p_glXDrawableAttribARB = proc("glXDrawableAttribARB"); p_glXDrawableAttribARB = proc( (const GLubyte *) "glXDrawableAttribARB");
bTest = (NULL != p_glXBindTexImageARB && NULL != p_glXReleaseTexImageARB && NULL != p_glXDrawableAttribARB); bTest = (NULL != p_glXBindTexImageARB && NULL != p_glXReleaseTexImageARB && NULL != p_glXDrawableAttribARB);
} else { } else {
use_render_texture_emulation = 0; use_render_texture_emulation = 0;
@ -156,7 +156,7 @@ BOOL query_function_swap_control(glXGetProcAddressARB_t proc, const char *gl_ver
{ {
BOOL bTest = (0 <= strcmp("1.3", glx_version) || NULL != strstr(glx_extensions, "GLX_SGI_swap_control")); BOOL bTest = (0 <= strcmp("1.3", glx_version) || NULL != strstr(glx_extensions, "GLX_SGI_swap_control"));
if (bTest) { if (bTest) {
p_glXSwapIntervalSGI = proc("glXSwapIntervalSGI"); p_glXSwapIntervalSGI = proc( (const GLubyte *) "glXSwapIntervalSGI");
bTest = (NULL != p_glXSwapIntervalSGI); bTest = (NULL != p_glXSwapIntervalSGI);
} }
return bTest; return bTest;
@ -901,10 +901,10 @@ GLboolean WINAPI wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int *p
} }
switch (iAttribute) { switch (iAttribute) {
case WGL_PBUFFER_WIDTH_ARB: case WGL_PBUFFER_WIDTH_ARB:
glXQueryDrawable(object->display, object->drawable, GLX_WIDTH, piValue); glXQueryDrawable(object->display, object->drawable, GLX_WIDTH, (unsigned int*) piValue);
break; break;
case WGL_PBUFFER_HEIGHT_ARB: case WGL_PBUFFER_HEIGHT_ARB:
glXQueryDrawable(object->display, object->drawable, GLX_HEIGHT, piValue); glXQueryDrawable(object->display, object->drawable, GLX_HEIGHT, (unsigned int*) piValue);
break; break;
case WGL_PBUFFER_LOST_ARB: case WGL_PBUFFER_LOST_ARB:
@ -967,7 +967,7 @@ GLboolean WINAPI wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
return GL_FALSE; return GL_FALSE;
} }
if (1 == use_render_texture_emulation) { if (1 == use_render_texture_emulation) {
GLuint prev_binded_tex; GLint prev_binded_tex;
glGetIntegerv(object->texture_target, &prev_binded_tex); glGetIntegerv(object->texture_target, &prev_binded_tex);
glBindTexture(object->texture_target, object->texture); glBindTexture(object->texture_target, object->texture);
if (GL_TEXTURE_1D == object->texture_target) { if (GL_TEXTURE_1D == object->texture_target) {