Fixes to silence warnings in code generated by glapi scripts.
authorKristian Høgsberg <krh@redhat.com>
Wed, 29 Mar 2006 22:32:38 +0000 (22:32 +0000)
committerKristian Høgsberg <krh@redhat.com>
Wed, 29 Mar 2006 22:32:38 +0000 (22:32 +0000)
src/mesa/glapi/Makefile
src/mesa/glapi/glX_proto_recv.py
src/mesa/glapi/glX_proto_size.py
src/mesa/glapi/glapi.c

index 129e51fb1f066dcc0b754cbbfc6483c4cc8baa48..1030e5e2c3bda7a3e88a39a6d37eb7a094b3bb92 100644 (file)
@@ -24,7 +24,9 @@ GLX_DIR   = $(XORG_BASE)/GL/glx
 
 SERVER_OUTPUTS = $(GLX_DIR)/indirect_dispatch.c \
        $(GLX_DIR)/indirect_dispatch_swap.c \
-       $(GLX_DIR)/indirect_dispatch.h
+       $(GLX_DIR)/indirect_dispatch.h \
+       $(GLX_DIR)/indirect_size_get.c \
+       $(GLX_DIR)/indirect_size_get.h
 
 COMMON = gl_XML.py license.py gl_API.xml typeexpr.py
 COMMON_GLX = $(COMMON) glX_XML.py glX_proto_common.py
index a0c4ea0541a9f965b0cb2014b572d12f550af454..86bdd0ec93a930782a77b1b90f1a5c83ba275933 100644 (file)
@@ -237,7 +237,7 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
 
                for param in f.parameterIterator():
 
-                       if param.is_counter or param.is_image() or param.is_output or len(param.count_parameter_list):
+                       if param.is_counter or param.is_image() or param.is_output or param.name in f.count_parameter_list or len(param.count_parameter_list):
                                location = param.name
                        else:
                                location = self.fetch_param(param)
@@ -360,6 +360,8 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
                                                        else:
                                                                swap_func = self.swap_name(sub[0])
                                                                print '        %s = (%s) %s( (%s *) (pc + %s), %s ); break;' % (param.name, param.type_string(), swap_func, self.real_types[sub[0]], o, count_name)
+                                               print '    default:'
+                                               print '        return;'
                                                print '    }'
                                        else:
                                                swap_func = self.swap_name(type_size)
index 81a98423a4b0d14ab3662b662f433896ed2da47d..54232781d291395ba8bca9c5a34d8b423314fd03 100644 (file)
@@ -316,6 +316,8 @@ class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common):
                print '#include <GL/gl.h>'
                if self.emit_get:
                        print '#include "indirect_size_get.h"'
+                       print '#include "glxserver.h"'
+                       print '#include "indirect_util.h"'
                
                print '#include "indirect_size.h"'
 
index 680020553059b13f6a146954ef91aa60885d0a73..3f2ec270fef6e9ea5f0180d6b57477da80c19a65 100644 (file)
@@ -60,7 +60,9 @@
 static GLboolean WarnFlag = GL_FALSE;
 static _glapi_warning_func warning_func;
 
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
 static void init_glapi_relocs(void);
+#endif
 
 static _glapi_proc generate_entrypoint(GLuint functionOffset);
 static void fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
@@ -1013,6 +1015,7 @@ _glapi_check_table(const struct _glapi_table *table)
 }
 
 
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
 /**
  * Perform platform-specific GL API entry-point fixups.
  * 
@@ -1033,3 +1036,4 @@ init_glapi_relocs( void )
     }
 #endif /* defined( USE_X86_ASM ) && defined( GLX_USE_TLS ) */
 }
+#endif