aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-08-25 15:59:48 +0000
committerBrian Paul <[email protected]>2004-08-25 15:59:48 +0000
commita6c423d95663cfd8601cf84e10e8e1b12fa6ef15 (patch)
treee4d68d47d99c2f747619829a488dd0b6ba5cf361 /src/mesa/main
parent866286936ac34070826382f1d1cd28b613dd4bd1 (diff)
Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_noop.c1
-rw-r--r--src/mesa/main/bufferobj.c14
-rw-r--r--src/mesa/main/context.c10
-rw-r--r--src/mesa/main/debug.c2
-rw-r--r--src/mesa/main/dlist.c1
-rw-r--r--src/mesa/main/get.c4
-rw-r--r--src/mesa/main/image.c2
-rw-r--r--src/mesa/main/imports.c10
-rw-r--r--src/mesa/main/imports.h2
-rw-r--r--src/mesa/main/light.c1
-rw-r--r--src/mesa/main/pixel.c2
-rw-r--r--src/mesa/main/state.c5
-rw-r--r--src/mesa/main/texcompress.c1
-rw-r--r--src/mesa/main/texcompress_fxt1.c19
-rw-r--r--src/mesa/main/texcompress_s3tc.c9
-rw-r--r--src/mesa/main/texformat.c2
-rw-r--r--src/mesa/main/texformat_tmp.h36
-rw-r--r--src/mesa/main/teximage.c2
-rw-r--r--src/mesa/main/texobj.c1
-rw-r--r--src/mesa/main/texstore.c40
-rw-r--r--src/mesa/main/vtxfmt.c3
21 files changed, 144 insertions, 23 deletions
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c
index e5e6717e835..d09a4496573 100644
--- a/src/mesa/main/api_noop.c
+++ b/src/mesa/main/api_noop.c
@@ -568,6 +568,7 @@ void GLAPIENTRY _mesa_noop_EvalPoint2( GLint a, GLint b )
*/
void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
{
+ (void) mode;
}
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 1f9b988d334..fab1059a182 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -142,6 +142,9 @@ struct gl_buffer_object *
_mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_buffer_object *obj;
+
+ (void) ctx;
+
obj = MALLOC_STRUCT(gl_buffer_object);
_mesa_initialize_buffer_object(obj, name, target);
return obj;
@@ -157,6 +160,8 @@ _mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
void
_mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
{
+ (void) ctx;
+
if (bufObj->Data)
_mesa_free(bufObj->Data);
_mesa_free(bufObj);
@@ -170,6 +175,8 @@ void
_mesa_initialize_buffer_object( struct gl_buffer_object *obj,
GLuint name, GLenum target )
{
+ (void) target;
+
_mesa_bzero(obj, sizeof(struct gl_buffer_object));
obj->RefCount = 1;
obj->Name = name;
@@ -231,7 +238,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
{
void * new_data;
- (void) target;
+ (void) ctx; (void) target;
new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
if ( new_data != NULL ) {
@@ -269,6 +276,8 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid * data,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target;
+
if ( (bufObj->Data != NULL)
&& ((GLuint)(size + offset) <= bufObj->Size) ) {
_mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size );
@@ -299,6 +308,8 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, GLvoid * data,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target;
+
if ( (bufObj->Data != NULL)
&& ((GLuint)(size + offset) <= bufObj->Size) ) {
_mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size );
@@ -326,6 +337,7 @@ void *
_mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target; (void) access;
return bufObj->Data;
}
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index fd3174c0fa2..0330aa47beb 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -192,6 +192,7 @@ GLboolean
_mesa_loseCurrent(__GLcontext *gc)
{
/* XXX unbind context from thread */
+ (void) gc;
return GL_TRUE;
}
@@ -212,6 +213,7 @@ GLboolean
_mesa_makeCurrent(__GLcontext *gc)
{
/* XXX bind context to thread */
+ (void) gc;
return GL_TRUE;
}
@@ -267,6 +269,7 @@ _mesa_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask)
GLboolean
_mesa_forceCurrent(__GLcontext *gc)
{
+ (void) gc;
return GL_TRUE;
}
@@ -302,6 +305,7 @@ void
_mesa_notifyDestroy(__GLcontext *gc)
{
/* Unbind from it. */
+ (void) gc;
}
/**
@@ -322,6 +326,7 @@ _mesa_notifySwapBuffers(__GLcontext *gc)
struct __GLdispatchStateRec *
_mesa_dispatchExec(__GLcontext *gc)
{
+ (void) gc;
return NULL;
}
@@ -329,12 +334,14 @@ _mesa_dispatchExec(__GLcontext *gc)
void
_mesa_beginDispatchOverride(__GLcontext *gc)
{
+ (void) gc;
}
/** No-op */
void
_mesa_endDispatchOverride(__GLcontext *gc)
{
+ (void) gc;
}
/**
@@ -372,6 +379,8 @@ _mesa_init_default_exports(__GLexports *exports)
exports->dispatchExec = _mesa_dispatchExec;
exports->beginDispatchOverride = _mesa_beginDispatchOverride;
exports->endDispatchOverride = _mesa_endDispatchOverride;
+#else
+ (void) exports;
#endif
}
@@ -759,6 +768,7 @@ static void
one_time_init( GLcontext *ctx )
{
static GLboolean alreadyCalled = GL_FALSE;
+ (void) ctx;
_glthread_LOCK_MUTEX(OneTimeLock);
if (!alreadyCalled) {
GLuint i;
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 77ac9e85bb1..7ce6cceed8f 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -180,6 +180,8 @@ static void add_debug_flags( const char *debug )
*/
if (_mesa_strstr(debug, "flush"))
MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
+#else
+ (void) debug;
#endif
}
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index ea1a6ae1215..41b47722af8 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -165,6 +165,7 @@ do { \
* integer values starting at 0 is very important, see InstSize array usage)
*/
typedef enum {
+ OPCODE_INVALID = -1, /* Force signed enum */
OPCODE_ACCUM,
OPCODE_ALPHA_FUNC,
OPCODE_BIND_TEXTURE,
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7a5e6ff8d95..38ae4df85be 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -6390,7 +6390,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
return;
}
- *params = (GLvoid *) ctx->FragmentProgram.Callback;
+ *params = *(GLvoid **) &ctx->FragmentProgram.Callback;
break;
case GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA:
if (!ctx->Extensions.MESA_program_debug) {
@@ -6404,7 +6404,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
return;
}
- *params = (GLvoid *) ctx->VertexProgram.Callback;
+ *params = *(GLvoid **) &ctx->VertexProgram.Callback;
break;
case GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA:
if (!ctx->Extensions.MESA_program_debug) {
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 57fe6c3fbf7..fcac0437193 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -3778,6 +3778,8 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest,
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking )
{
+ (void) srcPacking;
+
switch (srcType) {
case GL_BYTE:
{
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 0afc4ea4313..2219468f75a 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -536,7 +536,7 @@ _mesa_bitcount(unsigned int n)
GLhalfARB
_mesa_float_to_half(float val)
{
- const int flt = *((int *) &val);
+ const int flt = *((int *) (void *) &val);
const int flt_m = flt & 0x7fffff;
const int flt_e = (flt >> 23) & 0xff;
const int flt_s = (flt >> 31) & 0x1;
@@ -662,7 +662,7 @@ _mesa_half_to_float(GLhalfARB val)
}
flt = (flt_s << 31) | (flt_e << 23) | flt_m;
- result = *((float *) &flt);
+ result = *((float *) (void *) &flt);
return result;
}
@@ -1004,6 +1004,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
{
char s[MAXSTRING];
va_list args;
+ (void) ctx;
va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args);
va_end(args);
@@ -1094,6 +1095,7 @@ default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
{
int r;
va_list args;
+ (void) gc;
va_start( args, fmt );
r = vsprintf( str, fmt, args );
va_end( args );
@@ -1104,6 +1106,7 @@ default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
static void * CAPI
default_fopen(__GLcontext *gc, const char *path, const char *mode)
{
+ (void) gc;
return fopen(path, mode);
}
@@ -1111,6 +1114,7 @@ default_fopen(__GLcontext *gc, const char *path, const char *mode)
static int CAPI
default_fclose(__GLcontext *gc, void *stream)
{
+ (void) gc;
return fclose((FILE *) stream);
}
@@ -1120,6 +1124,7 @@ default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
{
int r;
va_list args;
+ (void) gc;
va_start( args, fmt );
r = vfprintf( (FILE *) stream, fmt, args );
va_end( args );
@@ -1132,6 +1137,7 @@ default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
static __GLdrawablePrivate *
default_GetDrawablePrivate(__GLcontext *gc)
{
+ (void) gc;
return NULL;
}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 6b705f64154..62b71e49be5 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -556,7 +556,7 @@ static INLINE int iceil(float f)
***/
#if defined(USE_IEEE) && !defined(DEBUG)
#define COPY_FLOAT( dst, src ) \
- ((fi_type *) &(dst))->i = ((fi_type *) &(src))->i
+ ((fi_type *) &(dst))->i = ((fi_type *) (void *) &(src))->i
#else
#define COPY_FLOAT( dst, src ) (dst) = (src)
#endif
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index d7a995917df..0cf2635765f 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1129,6 +1129,7 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state )
{
const GLuint oldneedeyecoords = ctx->_NeedEyeCoords;
+ (void) new_state;
ctx->_NeedEyeCoords = 0;
if (ctx->_ForceEyeCoords ||
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index c4fa17f22f9..932dfce61cb 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -791,6 +791,8 @@ _mesa_scale_and_bias_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4],
GLfloat rBias, GLfloat gBias,
GLfloat bBias, GLfloat aBias)
{
+ (void) ctx;
+
if (rScale != 1.0 || rBias != 0.0) {
GLuint i;
for (i = 0; i < n; i++) {
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 0f3750e61ca..997e3829c8a 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -119,10 +119,11 @@ generic_noop(void)
void
_mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize)
{
+ typedef void (*func_ptr_t)();
GLuint i;
- void **dispatch = (void **) table;
+ func_ptr_t *dispatch = (func_ptr_t *) table;
for (i = 0; i < tableSize; i++) {
- dispatch[i] = (void *) generic_noop;
+ dispatch[i] = (func_ptr_t)generic_noop;
}
}
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 3d0326fccac..396f14a5663 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -113,6 +113,7 @@ _mesa_compressed_texture_size( GLcontext *ctx,
GLuint size;
ASSERT(depth == 1);
+ (void) depth;
switch (format) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 603f434f209..3aa5e663988 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -57,6 +57,7 @@ fxt1_decode_1 (const void *texture, int width,
void
_mesa_init_texture_fxt1( GLcontext *ctx )
{
+ (void) ctx;
}
@@ -76,6 +77,7 @@ texstore_rgb_fxt1(STORE_PARAMS)
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGB ||
srcType != CHAN_TYPE ||
@@ -131,6 +133,7 @@ texstore_rgba_fxt1(STORE_PARAMS)
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
@@ -174,6 +177,7 @@ static void
fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
}
@@ -184,6 +188,7 @@ fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -196,6 +201,7 @@ static void
fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
texel[ACOMP] = 255;
}
@@ -207,6 +213,7 @@ fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -316,6 +323,7 @@ typedef struct {
#endif /* !__GNUC__ */
+#if 0 /* unused */
static int
fxt1_bestcol (float vec[][MAX_COMP], int nv,
@@ -360,6 +368,7 @@ fxt1_worst (float vec[MAX_COMP],
return worst;
}
+#endif /* unused */
static int
fxt1_variance (double variance[MAX_COMP],
@@ -390,6 +399,7 @@ fxt1_variance (double variance[MAX_COMP],
return best;
}
+#if 0 /* unused */
static int
fxt1_choose (float vec[][MAX_COMP], int nv,
@@ -678,6 +688,7 @@ fxt1_quantize_ALPHA0 (unsigned long *cc,
cc[0] = lolo;
}
+#endif /* unused */
static void
fxt1_quantize_ALPHA1 (unsigned long *cc,
@@ -868,6 +879,7 @@ fxt1_quantize_ALPHA1 (unsigned long *cc,
((Fx64 *)cc)[1] = hi;
}
+#if 0 /* unused*/
static void
fxt1_quantize_HI (unsigned long *cc,
@@ -966,6 +978,7 @@ fxt1_quantize_HI (unsigned long *cc,
}
}
+#endif /* unused */
static void
fxt1_quantize_MIXED1 (unsigned long *cc,
@@ -1284,7 +1297,7 @@ fxt1_quantize_MIXED0 (unsigned long *cc,
}
/* funky encoding for LSB of green */
- if (((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
+ if ((int)((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[1][i] = input[minColL][i];
vec[0][i] = input[maxColL][i];
@@ -1339,7 +1352,7 @@ fxt1_quantize_MIXED0 (unsigned long *cc,
}
/* funky encoding for LSB of green */
- if (((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
+ if ((int)((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[3][i] = input[minColR][i];
vec[2][i] = input[maxColR][i];
@@ -1455,6 +1468,8 @@ fxt1_encode (GLcontext *ctx,
unsigned long *encoded = dest;
GLubyte *newSource = NULL;
+ (void) ctx;
+
/*
* Rescale image if width is less than 8 or height is less than 4.
*/
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 08697f46c42..572cdd25614 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -45,6 +45,7 @@ void
_mesa_init_texture_s3tc( GLcontext *ctx )
{
/* called during context initialization */
+ (void) ctx;
}
@@ -64,6 +65,7 @@ texstore_rgb_dxt1(STORE_PARAMS)
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGB ||
srcType != CHAN_TYPE ||
@@ -121,6 +123,7 @@ texstore_rgba_dxt1(STORE_PARAMS)
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
@@ -176,6 +179,7 @@ texstore_rgba_dxt3(STORE_PARAMS)
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
@@ -230,6 +234,7 @@ texstore_rgba_dxt5(STORE_PARAMS)
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
@@ -272,6 +277,7 @@ static void
fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
@@ -293,6 +299,7 @@ static void
fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
@@ -314,6 +321,7 @@ static void
fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
@@ -335,6 +343,7 @@ static void
fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index c4f7a23e812..a496cf8cbf3 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -63,6 +63,7 @@
static void fetch_null_texel( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k;
texel[RCOMP] = 0;
texel[GCOMP] = 0;
texel[BCOMP] = 0;
@@ -73,6 +74,7 @@ static void fetch_null_texel( const struct gl_texture_image *texImage,
static void fetch_null_texelf( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k;
texel[RCOMP] = 0.0;
texel[GCOMP] = 0.0;
texel[BCOMP] = 0.0;
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 0ccdead291b..d341c7864ae 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -44,34 +44,46 @@
#if DIM == 1
#define CHAN_SRC( t, i, j, k, sz ) \
- ((GLchan *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLchan *)(t)->Data + (i) * (sz)))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((GLubyte *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLubyte *)(t)->Data + (i) * (sz)))
#define USHORT_SRC( t, i, j, k ) \
- ((GLushort *)(t)->Data + (i))
+ ((void) (j), (void) (k), \
+ ((GLushort *)(t)->Data + (i)))
#define UINT_SRC( t, i, j, k ) \
- ((GLuint *)(t)->Data + (i))
+ ((void) (j), (void) (k), \
+ ((GLuint *)(t)->Data + (i)))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((GLfloat *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLfloat *)(t)->Data + (i) * (sz)))
#define HALF_SRC( t, i, j, k, sz ) \
- ((GLhalfARB *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLhalfARB *)(t)->Data + (i) * (sz)))
#define FETCH(x) fetch_texel_1d_##x
#elif DIM == 2
#define CHAN_SRC( t, i, j, k, sz ) \
- ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define USHORT_SRC( t, i, j, k ) \
- ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i)))
+ ((void) (k), \
+ ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i))))
#define UINT_SRC( t, i, j, k ) \
- ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i)))
+ ((void) (k), \
+ ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i))))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define HALF_SRC( t, i, j, k, sz ) \
- ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define FETCH(x) fetch_texel_2d_##x
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index b1f526c175d..b60a91f3703 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -481,6 +481,7 @@ is_ycbcr_format(GLenum format)
static GLboolean
is_compressed_format(GLcontext *ctx, GLenum internalFormat)
{
+ (void) ctx;
switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
case GL_COMPRESSED_RGBA_FXT1_3DFX:
@@ -2846,6 +2847,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
GLenum format, GLsizei imageSize)
{
GLint expectedSize, maxLevels = 0, maxTextureSize;
+ (void) zoffset;
if (dimensions == 1) {
/* 1D compressed textures not allowed */
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 5cf71e872d8..74a5fdc06e9 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -64,6 +64,7 @@ struct gl_texture_object *
_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
+ (void) ctx;
obj = MALLOC_STRUCT(gl_texture_object);
_mesa_initialize_texture_object(obj, name, target);
return obj;
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index c6c7cb488ad..879f585a87f 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -701,6 +701,7 @@ _mesa_texstore_rgba(GLcontext *ctx, GLuint dims,
GLboolean
_mesa_texstore_depth_component_float32(STORE_PARAMS)
{
+ (void) dims;
ASSERT(dstFormat == &_mesa_texformat_depth_component_float32);
ASSERT(dstFormat->TexelBytes == sizeof(GLfloat));
@@ -744,6 +745,7 @@ _mesa_texstore_depth_component_float32(STORE_PARAMS)
GLboolean
_mesa_texstore_depth_component16(STORE_PARAMS)
{
+ (void) dims;
ASSERT(dstFormat == &_mesa_texformat_depth_component16);
ASSERT(dstFormat->TexelBytes == sizeof(GLushort));
@@ -1553,6 +1555,7 @@ _mesa_texstore_a8(STORE_PARAMS)
GLboolean
_mesa_texstore_ci8(STORE_PARAMS)
{
+ (void) dims; (void) baseInternalFormat;
ASSERT(dstFormat == &_mesa_texformat_ci8);
ASSERT(dstFormat->TexelBytes == 1);
ASSERT(baseInternalFormat == GL_COLOR_INDEX);
@@ -1599,6 +1602,7 @@ _mesa_texstore_ycbcr(STORE_PARAMS)
{
const GLuint ui = 1;
const GLubyte littleEndian = *((const GLubyte *) &ui);
+ (void) ctx; (void) dims; (void) baseInternalFormat;
ASSERT((dstFormat == &_mesa_texformat_ycbcr) ||
(dstFormat == &_mesa_texformat_ycbcr_rev));
@@ -1852,6 +1856,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
{
GLint postConvWidth = width;
GLint sizeInBytes;
+ (void) border;
if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
@@ -1925,6 +1930,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
{
GLint postConvWidth = width, postConvHeight = height;
GLint texelBytes, sizeInBytes;
+ (void) border;
if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
@@ -2004,6 +2010,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage)
{
GLint texelBytes, sizeInBytes;
+ (void) border;
/* choose the texture format */
assert(ctx->Driver.ChooseTextureFormat);
@@ -2228,6 +2235,13 @@ _mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
@@ -2243,6 +2257,8 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
+ (void) width; (void) height; (void) border;
+
/* This is pretty simple, basically just do a memcpy without worrying
* about the usual image unpacking or image transfer operations.
*/
@@ -2299,6 +2315,14 @@ _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) height; (void) depth;
+ (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
@@ -2316,6 +2340,13 @@ _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) width;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
@@ -2336,6 +2367,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
GLint i, rows;
GLubyte *dest;
const GLubyte *src;
+ (void) format;
/* these should have been caught sooner */
ASSERT((width & 3) == 0 || width == 2 || width == 1);
@@ -2389,6 +2421,14 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) yoffset; (void) zoffset;
+ (void) width; (void) height; (void) depth;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 4f9a7c0e24f..e45e5ca22e2 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -49,6 +49,7 @@
{ \
GET_CURRENT_CONTEXT(ctx); \
struct gl_tnl_module *tnl = &(ctx->TnlModule); \
+ typedef void (*func_ptr_t)(); \
\
ASSERT( tnl->Current ); \
ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \
@@ -56,7 +57,7 @@
/* Save the swapped function's dispatch entry so it can be */ \
/* restored later. */ \
tnl->Swapped[tnl->SwapCount][0] = (void *)&(ctx->Exec->FUNC); \
- tnl->Swapped[tnl->SwapCount][1] = (void *)TAG(FUNC); \
+ *(func_ptr_t *)(tnl->Swapped[tnl->SwapCount]+1) = (func_ptr_t)TAG(FUNC); \
tnl->SwapCount++; \
\
if ( 0 ) \