From d1d41216825c0ac8ece71768145834eb22379248 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 27 Feb 2006 15:45:38 +0000 Subject: [PATCH] silence a bunch of warnings --- src/mesa/shader/shaderobjects_3dlabs.c | 1 + src/mesa/shader/slang/slang_assemble.h | 2 ++ src/mesa/shader/slang/slang_compile_function.c | 8 ++++---- src/mesa/shader/slang/slang_compile_function.h | 2 ++ src/mesa/shader/slang/slang_export.c | 4 ++-- src/mesa/shader/slang/slang_link.h | 8 ++++---- src/mesa/shader/slang/slang_utility.h | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c index 6faed114aa3..96f382437d5 100755 --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ b/src/mesa/shader/shaderobjects_3dlabs.c @@ -34,6 +34,7 @@ #include "imports.h" #include "hash.h" #include "shaderobjects.h" +#include "shaderobjects_3dlabs.h" #if USE_3DLABS_FRONTEND #include "slang_mesa.h" diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index ddb59f83a1e..ed1005454f2 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -31,6 +31,8 @@ extern "C" { #endif +struct slang_operation_; + typedef enum slang_assembly_type_ { /* core */ diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 50828d0b076..60d9e3360b6 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -150,16 +150,16 @@ slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_fu GLboolean _slang_build_export_code_table (slang_export_code_table *tbl, slang_function_scope *funs, slang_translation_unit *unit) { - slang_atom main; + slang_atom mainAtom; GLuint i; - main = slang_atom_pool_atom (tbl->atoms, "main"); - if (main == SLANG_ATOM_NULL) + mainAtom = slang_atom_pool_atom (tbl->atoms, "main"); + if (mainAtom == SLANG_ATOM_NULL) return GL_FALSE; for (i = 0; i < funs->num_functions; i++) { - if (funs->functions[i].header.a_name == main) + if (funs->functions[i].header.a_name == mainAtom) { slang_function *fun = &funs->functions[i]; slang_export_code_entry *e; diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 2ad1d053b01..0c884345399 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -29,6 +29,8 @@ extern "C" { #endif +struct slang_translation_unit_; + typedef enum slang_function_kind_ { slang_func_ordinary, diff --git a/src/mesa/shader/slang/slang_export.c b/src/mesa/shader/slang/slang_export.c index ffc2ec975ea..43ce35de497 100644 --- a/src/mesa/shader/slang/slang_export.c +++ b/src/mesa/shader/slang/slang_export.c @@ -125,13 +125,13 @@ slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *s * slang_export_code_entry */ -GLvoid slang_export_code_entry_ctr (slang_export_code_entry *self) +static GLvoid slang_export_code_entry_ctr (slang_export_code_entry *self) { self->name = SLANG_ATOM_NULL; self->address = ~0; } -GLvoid slang_export_code_entry_dtr (slang_export_code_entry *self) +static GLvoid slang_export_code_entry_dtr (slang_export_code_entry *self) { } diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 2f4fd254cec..5f8c4e73351 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -31,7 +31,7 @@ extern "C" { #endif -typedef enum +enum { SLANG_UNIFORM_BINDING_VERTEX, SLANG_UNIFORM_BINDING_FRAGMENT, @@ -63,7 +63,7 @@ typedef struct GLuint count; } slang_active_uniforms; -typedef enum +enum { SLANG_COMMON_FIXED_MODELVIEWMATRIX, SLANG_COMMON_FIXED_PROJECTIONMATRIX, @@ -107,7 +107,7 @@ typedef enum SLANG_COMMON_FIXED_MAX }; -typedef enum +enum { SLANG_VERTEX_FIXED_POSITION, SLANG_VERTEX_FIXED_POINTSIZE, @@ -134,7 +134,7 @@ typedef enum SLANG_VERTEX_FIXED_MAX }; -typedef enum +enum { SLANG_FRAGMENT_FIXED_FRAGCOORD, SLANG_FRAGMENT_FIXED_FRONTFACING, diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index b4bde3d5388..346ce6b6574 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -32,7 +32,7 @@ extern "C" { /* Compile-time assertions. If the expression is zero, try to declare an * array of size [-1] to cause compilation error. */ -#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0) +#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; (void) _array[0]; } while (0) #define slang_alloc_free(ptr) _mesa_free (ptr) #define slang_alloc_malloc(size) _mesa_malloc (size) -- 2.30.2