summaryrefslogtreecommitdiff
path: root/src/mesa/glapi
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-12-03 15:24:34 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-12-03 15:24:34 +0000
commita760ccf6d8a1f94d505b4c211ff4c30bc1d325a8 (patch)
tree27b266d1b4acc7d09551c4f3ca30129f74e39f18 /src/mesa/glapi
parent025aa9efcd8213ce530818cfd8be1b6d9e945b2c (diff)
silence a variety of warnings found with g++ 3.4.2
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r--src/mesa/glapi/gl_procs.py6
-rw-r--r--src/mesa/glapi/glapi.c16
-rw-r--r--src/mesa/glapi/glprocs.h6
3 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/glapi/gl_procs.py b/src/mesa/glapi/gl_procs.py
index b8a6253eff..f9ce8e2da1 100644
--- a/src/mesa/glapi/gl_procs.py
+++ b/src/mesa/glapi/gl_procs.py
@@ -50,11 +50,11 @@ class PrintGlProcs(gl_XML.FilterGLAPISpecBase):
print ' */'
print ''
print 'typedef struct {'
- print ' int Name_offset;'
+ print ' GLint Name_offset;'
print '#ifdef NEED_FUNCTION_POINTER'
print ' _glapi_proc Address;'
print '#endif'
- print ' unsigned int Offset;'
+ print ' GLuint Offset;'
print '} glprocs_table_t;'
print ''
print '#ifdef NEED_FUNCTION_POINTER'
@@ -132,7 +132,7 @@ class PrintGlProcs(gl_XML.FilterGLAPISpecBase):
base_offset += len(self.functions[k].name) + 3
- print ' NAME_FUNC_OFFSET( -1, NULL, -1 )'
+ print ' NAME_FUNC_OFFSET( -1, NULL, 0 )'
print '};'
return
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 621c15a33b..f395d1879a 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -115,7 +115,7 @@ warn(void)
#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
-static int NoOpUnused(void)
+static GLint NoOpUnused(void)
{
if (warn()) {
warning_func(NULL, "GL User Error: calling extension function without a current context\n");
@@ -172,7 +172,7 @@ static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#define TABLE_ENTRY(name) (_glapi_proc) gl##name
-static int glUnused(void)
+static GLint glUnused(void)
{
return 0;
}
@@ -467,9 +467,9 @@ _glapi_get_override_dispatch(int layer)
static const glprocs_table_t *
find_entry( const char * n )
{
- unsigned i;
+ GLuint i;
- for ( i = 0 ; static_functions[i].Name_offset >= 0 ; i++ ) {
+ for (i = 0; static_functions[i].Name_offset >= 0; i++) {
const char * test_name;
test_name = gl_string_table + static_functions[i].Name_offset;
@@ -549,9 +549,9 @@ get_static_proc_address(const char *funcName)
static const char *
get_static_proc_name( GLuint offset )
{
- unsigned i;
+ GLuint i;
- for ( i = 0 ; static_functions[i].Name_offset >= 0 ; i++ ) {
+ for (i = 0; static_functions[i].Name_offset >= 0; i++) {
if (static_functions[i].Offset == offset) {
return gl_string_table + static_functions[i].Name_offset;
}
@@ -1014,7 +1014,7 @@ _glapi_check_table(const struct _glapi_table *table)
GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
assert(pointParameterivOffset == _gloffset_PointParameterivNV);
assert(pointParameterivOffset == offset);
- assert(_glapi_get_proc_address("glPointParameterivNV") == &glPointParameterivNV);
+ assert(_glapi_get_proc_address("glPointParameterivNV") == (_glapi_proc) &glPointParameterivNV);
}
{
GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
@@ -1022,7 +1022,7 @@ _glapi_check_table(const struct _glapi_table *table)
GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
assert(setFenceOffset == _gloffset_SetFenceNV);
assert(setFenceOffset == offset);
- assert(_glapi_get_proc_address("glSetFenceNV") == &glSetFenceNV);
+ assert(_glapi_get_proc_address("glSetFenceNV") == (_glapi_proc) &glSetFenceNV);
}
#else
(void) table;
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index 02cf81abcd..9e510d2695 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -31,11 +31,11 @@
*/
typedef struct {
- int Name_offset;
+ GLint Name_offset;
#ifdef NEED_FUNCTION_POINTER
_glapi_proc Address;
#endif
- unsigned int Offset;
+ GLuint Offset;
} glprocs_table_t;
#ifdef NEED_FUNCTION_POINTER
@@ -1969,7 +1969,7 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET( 17136, glBlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT ),
NAME_FUNC_OFFSET( 17160, glPointParameterfSGIS, _gloffset_PointParameterfEXT ),
NAME_FUNC_OFFSET( 17182, glPointParameterfvSGIS, _gloffset_PointParameterfvEXT ),
- NAME_FUNC_OFFSET( -1, NULL, -1 )
+ NAME_FUNC_OFFSET( -1, NULL, 0 )
};
#undef NAME_FUNC_OFFSET