From b51b0a847d7e7daaea69f77ab569086ef81c24a2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Mar 2001 05:06:11 +0000 Subject: fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems --- src/mesa/glapi/glapi.c | 8 ++++---- src/mesa/glapi/glthread.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/glapi') diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index 90ed9eacc2..82c48ea065 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -1,4 +1,4 @@ -/* $Id: glapi.c,v 1.49 2001/01/23 23:35:47 brianp Exp $ */ +/* $Id: glapi.c,v 1.50 2001/03/07 05:06:11 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1675,7 +1675,7 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset) { GLint index = get_static_proc_offset(funcName); if (index >= 0) { - return (GLboolean) (index == offset); /* bad offset! */ + return (GLboolean) ((GLuint) index == offset); /* bad offset! */ } } @@ -1783,7 +1783,7 @@ GLint _glapi_get_proc_offset(const char *funcName) { /* search extension functions first */ - GLint i; + GLuint i; for (i = 0; i < NumExtEntryPoints; i++) { if (strcmp(ExtEntryTable[i].Name, funcName) == 0) { return ExtEntryTable[i].Offset; @@ -1803,7 +1803,7 @@ const GLvoid * _glapi_get_proc_address(const char *funcName) { /* search extension functions first */ - GLint i; + GLuint i; for (i = 0; i < NumExtEntryPoints; i++) { if (strcmp(ExtEntryTable[i].Name, funcName) == 0) { return ExtEntryTable[i].Address; diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index b9c8506516..4599f39dcc 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -1,4 +1,4 @@ -/* $Id: glthread.c,v 1.6 2000/02/11 21:38:33 brianp Exp $ */ +/* $Id: glthread.c,v 1.7 2001/03/07 05:06:11 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -93,7 +93,7 @@ _glthread_InitTSD(_glthread_TSD *tsd) void * _glthread_GetTSD(_glthread_TSD *tsd) { - if (tsd->initMagic != INIT_MAGIC) { + if (tsd->initMagic != (int) INIT_MAGIC) { _glthread_InitTSD(tsd); } return pthread_getspecific(tsd->key); @@ -103,7 +103,7 @@ _glthread_GetTSD(_glthread_TSD *tsd) void _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) { - if (tsd->initMagic != INIT_MAGIC) { + if (tsd->initMagic != (int) INIT_MAGIC) { _glthread_InitTSD(tsd); } if (pthread_setspecific(tsd->key, ptr) != 0) { -- cgit v1.2.3