Commit a6c423d9 authored by Brian Paul's avatar Brian Paul

Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)

parent 86628693
......@@ -58,8 +58,9 @@
.PHONY : all libgl clean realclean
CPU ?= pentium
CFLAGS = -Wall -W -pedantic
# when -std=c99 mingw will not define WIN32
CFLAGS = -Wall -W -Werror -pedantic -std=c99 -DWIN32
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
export CFLAGS
......
......@@ -52,15 +52,17 @@ extern "C" {
#include "gl\gl.h"
#pragma warning (disable:4273)
#pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
#pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
#pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
#pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
#pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
#pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
#if (MESA_WARNQUIET>1)
# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
#if defined(_MSV_VER) && !defined(__GNUC__)
# pragma warning (disable:4273)
# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
# if (MESA_WARNQUIET>1)
# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
# endif
#endif
/*
......
......@@ -276,6 +276,7 @@ import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.TexCoord[unit];
struct gl_client_array *to = &ac->Cache.TexCoord[unit];
(void) type; (void) stride;
ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
......@@ -305,6 +306,7 @@ import_vertex( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Vertex;
struct gl_client_array *to = &ac->Cache.Vertex;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
......@@ -331,6 +333,7 @@ import_normal( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Normal;
struct gl_client_array *to = &ac->Cache.Normal;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
......@@ -355,6 +358,7 @@ import_color( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Color;
struct gl_client_array *to = &ac->Cache.Color;
(void) stride;
import( ctx, type, to, from );
......@@ -367,6 +371,7 @@ import_index( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Index;
struct gl_client_array *to = &ac->Cache.Index;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
......@@ -391,6 +396,7 @@ import_secondarycolor( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.SecondaryColor;
struct gl_client_array *to = &ac->Cache.SecondaryColor;
(void) stride;
import( ctx, type, to, from );
......@@ -403,6 +409,7 @@ import_fogcoord( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.FogCoord;
struct gl_client_array *to = &ac->Cache.FogCoord;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
......@@ -427,6 +434,7 @@ import_edgeflag( GLcontext *ctx, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.EdgeFlag;
struct gl_client_array *to = &ac->Cache.EdgeFlag;
(void) type; (void) stride;
/* Limited choices at this stage:
*/
......@@ -451,6 +459,7 @@ import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride )
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Attrib[index];
struct gl_client_array *to = &ac->Cache.Attrib[index];
(void) type; (void) stride;
ASSERT(index < VERT_ATTRIB_MAX);
......
......@@ -24,6 +24,9 @@
/*
* $Log: colors.h,v $
* Revision 1.2 2004/08/25 15:59:48 brianp
* Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
*
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
......@@ -49,6 +52,9 @@
/*
* $Log: colors.h,v $
* Revision 1.2 2004/08/25 15:59:48 brianp
* Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
*
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
......@@ -74,6 +80,9 @@
/*
* $Log: colors.h,v $
* Revision 1.2 2004/08/25 15:59:48 brianp
* Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
*
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
......@@ -141,7 +150,7 @@ char ColorMap16[] = {
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
#define BGR8(r,g,b) (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
#define BGR8(r,g,b) (unsigned)(((BYTE)((b & 0xc0) | ((g & 0xe0)>>2) | ((r & 0xe0)>>5))))
#ifdef DDRAW
#define BGR16(r,g,b) ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
#else
......
/* $Id: wgl.c,v 1.4 2004/08/25 14:59:45 brianp Exp $ */
/* $Id: wgl.c,v 1.5 2004/08/25 15:59:48 brianp Exp $ */
/*
* This library is free software; you can redistribute it and/or
......@@ -107,6 +107,7 @@ static unsigned curPFD = 0;
WGLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask)
{
(void) hglrcSrc; (void) hglrcDst; (void) mask;
return(FALSE);
}
......@@ -166,6 +167,7 @@ WGLAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc)
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,int iLayerPlane)
{
(void) hdc; (void) iLayerPlane;
SetLastError(0);
return(NULL);
}
......@@ -211,7 +213,8 @@ WGLAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc,HGLRC hglrc)
}
WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
{
{
(void) hglrc1; (void) hglrc2;
return(TRUE);
}
......@@ -219,7 +222,7 @@ WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
static FIXED FixedFromDouble(double d)
{
long l = (long) (d * 65536L);
return *(FIXED *)&l;
return *(FIXED *) (void *) &l;
}
......@@ -258,9 +261,9 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
SetTextColor(bitDevice, tempColor);
// Place chars based on base line
VERIFY(SetTextAlign(bitDevice, TA_BASELINE) >= 0 ? 1 : 0);
VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
for(i = 0; i < numChars; i++) {
for(i = 0; i < (int)numChars; i++) {
SIZE size;
char curChar;
int charWidth,charHeight,bmapWidth,bmapHeight,numBytes,res;
......@@ -285,7 +288,7 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
// Assign the output bitmap to the device
origBmap = SelectObject(bitDevice, bitObject);
VERIFY(origBmap);
(void) VERIFY(origBmap);
VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
......@@ -344,11 +347,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
MAT2 mat;
int success = TRUE;
if (first<0)
return FALSE;
if (count<0)
return FALSE;
if (listBase<0)
if (count == 0)
return FALSE;
font_list = listBase;
......@@ -373,7 +372,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
/*
** Otherwise process all desired characters.
*/
for (i = 0; i < count; i++)
for (i = 0; i < (int)count; i++)
{
DWORD err;
......@@ -432,6 +431,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc,DWORD first,DWORD count,DWORD listBase)
{
(void) hdc; (void) first; (void) count; (void) listBase;
return FALSE;
}
......@@ -440,6 +440,9 @@ WGLAPI BOOL GLAPIENTRY wglUseFontOutlinesA(HDC hdc,DWORD first,DWORD count,
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
(void) hdc; (void) first; (void) count;
(void) listBase; (void) deviation; (void) extrusion; (void) format;
(void) lpgmf;
SetLastError(0);
return(FALSE);
}
......@@ -449,6 +452,9 @@ WGLAPI BOOL GLAPIENTRY wglUseFontOutlinesW(HDC hdc,DWORD first,DWORD count,
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
(void) hdc; (void) first; (void) count;
(void) listBase; (void) deviation; (void) extrusion; (void) format;
(void) lpgmf;
SetLastError(0);
return(FALSE);
}
......@@ -457,6 +463,7 @@ WGLAPI BOOL GLAPIENTRY wglDescribeLayerPlane(HDC hdc,int iPixelFormat,
int iLayerPlane,UINT nBytes,
LPLAYERPLANEDESCRIPTOR plpd)
{
(void) hdc; (void) iPixelFormat; (void) iLayerPlane; (void) nBytes; (void) plpd;
SetLastError(0);
return(FALSE);
}
......@@ -465,6 +472,7 @@ WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
CONST COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
......@@ -473,18 +481,21 @@ WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
COLORREF *pcr)
{
(void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WGLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
{
(void) hdc; (void) iLayerPlane; (void) bRealize;
SetLastError(0);
return(FALSE);
}
WGLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,UINT fuPlanes)
{
(void) fuPlanes;
if( !hdc )
{
WMesaSwapBuffers();
......@@ -498,6 +509,7 @@ WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC hdc,
CONST PIXELFORMATDESCRIPTOR *ppfd)
{
int i,best = -1,bestdelta = 0x7FFFFFFF,delta,qt_valid_pix;
(void) hdc;
qt_valid_pix = qt_pix;
if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
......@@ -556,6 +568,7 @@ WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nByte
LPPIXELFORMATDESCRIPTOR ppfd)
{
int qt_valid_pix;
(void) hdc;
qt_valid_pix = qt_pix;
if(ppfd == NULL)
......@@ -584,6 +597,7 @@ WGLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc)
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
{
(void) hdc;
if(curPFD == 0)
{
SetLastError(0);
......@@ -596,6 +610,7 @@ WGLAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
PIXELFORMATDESCRIPTOR *ppfd)
{
int qt_valid_pix;
(void) hdc;
qt_valid_pix = qt_pix;
if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
......@@ -609,6 +624,7 @@ WGLAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
WGLAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc)
{
(void) hdc;
if (ctx_current < 0)
return FALSE;
......
This diff is collapsed.
......@@ -93,6 +93,7 @@ typedef struct _dibSection{
}WMDIBSECTION, *PWMDIBSECTION;
#ifdef COMPILE_SETPIXEL
struct wmesa_context;
typedef void (*SETPIXELTYPE)(struct wmesa_context *pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b);
#endif
......
......@@ -684,6 +684,7 @@ generate_entrypoint(GLuint functionOffset)
}
return code;
#else
(void) functionOffset;
return NULL;
#endif /* USE_*_ASM */
}
......@@ -718,6 +719,12 @@ fill_in_entrypoint_offset(void *entrypoint, GLuint offset)
__glapi_sparc_icache_flush(&code[2]);
#endif /* __sparc_v9__ && !linux */
#else
/* an unimplemented architecture */
(void) entrypoint;
(void) offset;
#endif /* USE_*_ASM */
}
......@@ -732,7 +739,7 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
/* trivial rejection test */
#ifdef MANGLE
if (!funcName || funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l')
return NULL;
return GL_FALSE;
#else
if (!funcName || funcName[0] != 'g' || funcName[1] != 'l')
return GL_FALSE;
......@@ -1006,5 +1013,7 @@ _glapi_check_table(const struct _glapi_table *table)
assert(setFenceOffset == offset);
assert(_glapi_get_proc_address("glSetFenceNV") == (void *) &glSetFenceNV);
}
#else
(void) table;
#endif
}
......@@ -568,6 +568,7 @@ void GLAPIENTRY _mesa_noop_EvalPoint2( GLint a, GLint b )
*/
void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
{
(void) mode;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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
}
......
......@@ -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,
......
......@@ -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) {
......
......@@ -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:
{
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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 ||
......
......@@ -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++) {
......
......@@ -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;
}
}
......
......@@ -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:
......
......@@ -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__ */