silence a bunch of warnings

This commit is contained in:
Brian Paul 2006-02-27 15:45:38 +00:00
parent 9ac9605de1
commit d1d4121682
7 changed files with 16 additions and 11 deletions

View file

@ -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"

View file

@ -31,6 +31,8 @@
extern "C" {
#endif
struct slang_operation_;
typedef enum slang_assembly_type_
{
/* core */

View file

@ -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;

View file

@ -29,6 +29,8 @@
extern "C" {
#endif
struct slang_translation_unit_;
typedef enum slang_function_kind_
{
slang_func_ordinary,

View file

@ -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)
{
}

View file

@ -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,

View file

@ -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)