Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 25 Aug 2004 15:59:48 +0000 (15:59 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 25 Aug 2004 15:59:48 +0000 (15:59 +0000)
55 files changed:
Makefile.mgw
include/GL/wmesa.h
src/mesa/array_cache/ac_import.c
src/mesa/drivers/windows/gdi/colors.h
src/mesa/drivers/windows/gdi/wgl.c
src/mesa/drivers/windows/gdi/wmesa.c
src/mesa/drivers/windows/gdi/wmesadef.h
src/mesa/glapi/glapi.c
src/mesa/main/api_noop.c
src/mesa/main/bufferobj.c
src/mesa/main/context.c
src/mesa/main/debug.c
src/mesa/main/dlist.c
src/mesa/main/get.c
src/mesa/main/image.c
src/mesa/main/imports.c
src/mesa/main/imports.h
src/mesa/main/light.c
src/mesa/main/pixel.c
src/mesa/main/state.c
src/mesa/main/texcompress.c
src/mesa/main/texcompress_fxt1.c
src/mesa/main/texcompress_s3tc.c
src/mesa/main/texformat.c
src/mesa/main/texformat_tmp.h
src/mesa/main/teximage.c
src/mesa/main/texobj.c
src/mesa/main/texstore.c
src/mesa/main/vtxfmt.c
src/mesa/math/m_clip_tmp.h
src/mesa/math/m_xform_tmp.h
src/mesa/shader/arbfragparse.c
src/mesa/shader/arbprogparse.c
src/mesa/shader/arbvertparse.c
src/mesa/shader/grammar.c
src/mesa/shader/nvfragprog.h
src/mesa/shader/nvvertexec.c
src/mesa/shader/nvvertparse.c
src/mesa/shader/program.c
src/mesa/swrast/s_auxbuffer.c
src/mesa/swrast/s_buffers.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_span.c
src/mesa/swrast/s_tcc.c
src/mesa/swrast/s_texture.c
src/mesa/swrast/s_triangle.c
src/mesa/tnl/t_array_api.c
src/mesa/tnl/t_array_import.c
src/mesa/tnl/t_context.c
src/mesa/tnl/t_save_api.c
src/mesa/tnl/t_save_loopback.c
src/mesa/tnl/t_vb_render.c
src/mesa/tnl/t_vertex.c
src/mesa/tnl/t_vertex_codegen.c
src/mesa/tnl/t_vtx_api.c

index 762b05b7110d295fd78459f76b76016e80e666c9..6f53efd55d8aa7c91b0d4b39132edb0c241765e2 100644 (file)
@@ -58,8 +58,9 @@
 .PHONY : all libgl clean realclean
 
 CPU ?= pentium
-
-CFLAGS = -Wall -W -pedantic
+\r
+# when -std=c99 mingw will not define WIN32
+CFLAGS = -Wall -W -Werror -pedantic -std=c99 -DWIN32
 CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
 
 export CFLAGS
index dc1ec89d2b173041f4d7b43dba2937baa4f6154f..79b3c823029bcaf1bc878214c805286fcfdda8c4 100644 (file)
@@ -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
 
 /*
index 49cff3dae3096d76dc715cf11878ad9ac053463c..c33a4e3fe12b665baac58bce9f426c809db725ad 100644 (file)
@@ -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);
 
index 7070b85e3254afac14d29f45120395efbe141846..5ee66e829de3c80ac46388fb23b5a2133d60fee2 100644 (file)
@@ -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
index 53850d1bdcef7a4e3cc18f48cc4e767b7f8633bf..b530cfc02db252ac6b745fc0dff9fb06b9994260 100644 (file)
@@ -1,4 +1,4 @@
-/* $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;\r
     return(FALSE);
 }
 
@@ -166,6 +167,7 @@ WGLAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc)
 
 WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,int iLayerPlane)
 {
+    (void) hdc; (void) iLayerPlane;\r
     SetLastError(0);
     return(NULL);
 }
@@ -211,7 +213,8 @@ WGLAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc,HGLRC hglrc)
 }
 
 WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
-{
+{\r
+    (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;\r
     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;\r
+    (void) listBase; (void) deviation; (void) extrusion; (void) format;\r
+    (void) lpgmf;\r
     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;\r
+    (void) listBase; (void) deviation; (void) extrusion; (void) format;\r
+    (void) lpgmf;\r
     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;\r
     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;\r
     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;\r
     SetLastError(0);
     return(0);
 }
 
 WGLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
 {
+    (void) hdc; (void) iLayerPlane; (void) bRealize;\r
     SetLastError(0);
     return(FALSE);
 }
 
 WGLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,UINT fuPlanes)
 {
+    (void) fuPlanes;\r
     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;\r
 
     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;\r
 
     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;\r
     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;\r
 
     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;\r
    if (ctx_current < 0)
       return FALSE;
 
index eb64cf69a598834bb5cb77522fe17fec580e0e2c..53d202251adfcc198b353efe9ee9bf0cd8432128 100644 (file)
@@ -45,6 +45,7 @@
 #include "array_cache/acache.h"
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
+#include "swrast/s_alphabuf.h"
 #include "swrast/s_context.h"
 #include "swrast/s_depth.h"
 #include "swrast/s_lines.h"
@@ -165,7 +166,6 @@ static BOOL DDCreateOffScreen(WMesaContext wc);
 #define USE_GDI_TO_CLEAR 1
 #endif
 
-static void FlushToFile(PWMC pwc, PSTR  szFile);
 BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
 BOOL wmDeleteBackingStore(PWMC pwc);
 void wmCreatePalette( PWMC pwdc );
@@ -347,15 +347,20 @@ BOOL wmSetDIBits(PWMC pwc, UINT uiScanWidth, UINT uiNumScans,
 
 BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
 
+#if 0 /* unused */
+
 /* Finish all pending operations and synchronize. */
 static void finish(GLcontext* ctx)
 {
   /* No op */
+  (void) ctx;
 }
 
+#endif /* unused */
 
 static void flush(GLcontext* ctx)
 {
+  (void) ctx;
   if((Current->rgb_flag &&!(Current->db_flag))
      ||(!Current->rgb_flag))
     {
@@ -371,6 +376,7 @@ static void flush(GLcontext* ctx)
  */
 static void clear_index(GLcontext* ctx, GLuint index)
 {
+  (void) ctx;
   Current->clearpixel = index;
 }
 
@@ -382,6 +388,7 @@ static void clear_index(GLcontext* ctx, GLuint index)
 static void clear_color( GLcontext* ctx, const GLfloat color[4] )
 {
   GLubyte col[4];
+  (void) ctx;
   CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]);
   CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]);
   CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]);
@@ -400,7 +407,7 @@ static void clear_color( GLcontext* ctx, const GLfloat color[4] )
  * Otherwise, we let swrast do it. 
  */ 
 
-static clear(GLcontext* ctx, GLbitfield mask, 
+static void clear(GLcontext* ctx, GLbitfield mask, 
       GLboolean all, GLint x, GLint y, GLint width, GLint height) 
 { 
   const   GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; 
@@ -467,7 +474,7 @@ static clear(GLcontext* ctx, GLbitfield mask,
    WORD    wColor; 
    BYTE    bColor; 
    LPDWORD lpdw = (LPDWORD)Current->pbPixels; 
-   LPWORD  lpw = (LPWORD)Current->pbPixels; 
+   /*LPWORD  lpw = (LPWORD)Current->pbPixels; */
    LPBYTE  lpb = Current->pbPixels; 
    int     lines; 
    /* Double-buffering - clear back buffer */ 
@@ -513,7 +520,9 @@ static clear(GLcontext* ctx, GLbitfield mask,
        dwColor = BGR32(GetRValue(Current->clearpixel), 
          GetGValue(Current->clearpixel), 
          GetBValue(Current->clearpixel)); 
-   } 
+   }
+   else
+       dwColor = 0;
 
    if (nBypp != 3) 
    { 
@@ -567,6 +576,7 @@ static clear(GLcontext* ctx, GLbitfield mask,
 
 static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
 {
+  (void) ctx;
   if (!Current)
     return;
   
@@ -592,6 +602,7 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
 static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
                        GLuint bufferBit )
 {
+  (void) ctx; (void) colorBuffer; (void) bufferBit;
   /* XXX todo - examine bufferBit and set read/write pointers */
   return;
 }
@@ -601,9 +612,10 @@ static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
 /* Return characteristics of the output buffer. */
 static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
 {
-  GET_CURRENT_CONTEXT(ctx);
+  /*GET_CURRENT_CONTEXT(ctx);*/
   int New_Size;
   RECT CR;
+  (void) buffer;
   
   GetClientRect(Current->Window,&CR);
   
@@ -649,25 +661,36 @@ static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
 
 /* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
 
+#if 0 /* unused */
+
 static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
 {
+  (void) ctx; (void) first; (void) last;
 }
 
+#endif /* unused */
+
 /* Return pointer to accelerated points function */
 extern tnl_points_func choose_points_function( GLcontext* ctx )
 {
+  (void) ctx;
   return NULL;
 }
 
+#if 0 /* unused */
+
 static void fast_flat_rgb_line( GLcontext* ctx, GLuint v0, 
                                GLuint v1, GLuint pv )
 {
+  (void) ctx; (void) v0; (void) v1; (void) pv;
 }
 
 static tnl_line_func choose_line_function( GLcontext* ctx )
 {
+  (void) ctx;
 }
 
+#endif /* unused */
 
 /**********************************************************************/
 /*****                 Span-based pixel drawing                   *****/
@@ -682,6 +705,7 @@ static void write_ci32_span( const GLcontext* ctx,
 {
   GLuint i;
   PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++)
     if (mask[i])
@@ -697,6 +721,7 @@ static void write_ci8_span( const GLcontext* ctx,
 {
   GLuint i;
   PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++)
     if (mask[i])
@@ -715,6 +740,7 @@ static void write_mono_ci_span(const GLcontext* ctx,
 {
   GLuint i;
   BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++)
     if (mask[i])
@@ -731,11 +757,12 @@ static void write_rgba_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
                              const GLubyte rgba[][4], const GLubyte mask[] )
 {
   PWMC    pwc = Current;
+  (void) ctx;
   
   if (pwc->rgb_flag==GL_TRUE)
     {
       GLuint i;
-      HDC DC=DD_GETDC;
+      /*HDC DC=DD_GETDC;*/
       y=FLIP(y);
       if (mask) {
        for (i=0; i<n; i++)
@@ -779,11 +806,12 @@ static void write_rgb_span( const GLcontext* ctx,
                             const GLubyte rgb[][3], const GLubyte mask[] )
 {
   PWMC    pwc = Current;
-  
+  (void) ctx;
+
   if (pwc->rgb_flag==GL_TRUE)
     {
       GLuint i;
-      HDC DC=DD_GETDC;
+      /*HDC DC=DD_GETDC;*/
       y=FLIP(y);
       if (mask) {
        for (i=0; i<n; i++)
@@ -831,6 +859,7 @@ static void write_mono_rgba_span( const GLcontext* ctx,
 {
   GLuint i;
   PWMC pwc = Current;
+  (void) ctx;
   assert(Current->rgb_flag==GL_TRUE);
   y=FLIP(y);
   if(Current->rgb_flag==GL_TRUE)
@@ -863,6 +892,7 @@ static void write_ci32_pixels( const GLcontext* ctx,
                                const GLuint index[], const GLubyte mask[] )
 {
   GLuint i;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++) {
     if (mask[i]) {
@@ -884,6 +914,7 @@ static void write_mono_ci_pixels( const GLcontext* ctx,
                                   GLuint colorIndex, const GLubyte mask[] )
 {
   GLuint i;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++) {
     if (mask[i]) {
@@ -902,7 +933,8 @@ static void write_rgba_pixels( const GLcontext* ctx,
 {
   GLuint i;
   PWMC    pwc = Current;
-  HDC DC=DD_GETDC;
+  /*HDC DC=DD_GETDC;*/
+  (void) ctx;
   assert(Current->rgb_flag==GL_TRUE);
   for (i=0; i<n; i++)
     if (mask[i])
@@ -925,7 +957,8 @@ static void write_mono_rgba_pixels( const GLcontext* ctx,
 {
   GLuint i;
   PWMC    pwc = Current;
-  HDC DC=DD_GETDC;
+  /*HDC DC=DD_GETDC;*/
+  (void) ctx;
   assert(Current->rgb_flag==GL_TRUE);
   for (i=0; i<n; i++)
     if (mask[i])
@@ -946,6 +979,7 @@ static void read_ci32_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
                             GLuint index[])
 {
   GLuint i;
+  (void) ctx;
   BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++)
@@ -961,6 +995,7 @@ static void read_ci32_pixels( const GLcontext* ctx,
                               GLuint indx[], const GLubyte mask[] )
 {
   GLuint i;
+  (void) ctx;
   assert(Current->rgb_flag==GL_FALSE);
   for (i=0; i<n; i++) {
     if (mask[i]) {
@@ -979,6 +1014,7 @@ static void read_rgba_span( const GLcontext* ctx,
   UINT i;
   COLORREF Color;
   HDC DC=DD_GETDC;
+  (void) ctx;
   assert(Current->rgb_flag==GL_TRUE);
   y = Current->height - y - 1;
   for (i=0; i<n; i++) {
@@ -1000,6 +1036,7 @@ static void read_rgba_pixels( const GLcontext* ctx,
   GLuint i;
   COLORREF Color;
   HDC DC=DD_GETDC;
+  (void) ctx;
   assert(Current->rgb_flag==GL_TRUE);
   for (i=0; i<n; i++) {
     if (mask[i]) {
@@ -1022,6 +1059,7 @@ static void read_rgba_pixels( const GLcontext* ctx,
 
 static const GLubyte *get_string(GLcontext *ctx, GLenum name)
 {
+  (void) ctx;
   if (name == GL_RENDERER) {
     return (GLubyte *) "Mesa Windows";
   }
@@ -1074,7 +1112,7 @@ static void SetSWrastPointers(GLcontext *ctx)
 
 static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
 {
-  struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
+  /*struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );*/
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   
   /*
@@ -1166,7 +1204,7 @@ static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
 /*****                  WMesa API Functions                       *****/
 /**********************************************************************/
 
-
+#if 0 /* unused */
 
 #define PAL_SIZE 256
 static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
@@ -1178,11 +1216,9 @@ static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
     WORD Version;
     WORD NumberOfEntries;
     PALETTEENTRY aEntries[PAL_SIZE];
-  } Palette =
-    {
-      0x300,
-      PAL_SIZE
-    };
+  } Palette;
+  Palette.Version = 0x300;
+  Palette.NumberOfEntries = PAL_SIZE;
   hdc=GetDC(NULL);
   if (Pal!=NULL)
     GetPaletteEntries(Pal,0,PAL_SIZE,Palette.aEntries);
@@ -1226,6 +1262,7 @@ static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
     }
 }
 
+#endif /* unused */
 
 WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
                                 GLboolean rgb_flag,
@@ -1236,6 +1273,7 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
   WMesaContext c;
   GLboolean true_color_flag;
   struct dd_function_table functions;
+  (void) Pal;
 
   c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
   if (!c)
@@ -1436,7 +1474,7 @@ void WMesaMakeCurrent( WMesaContext c )
 
 void WMesaSwapBuffers( void )
 {
-  HDC DC = Current->hDC;
+/*  HDC DC = Current->hDC;*/
   GET_CURRENT_CONTEXT(ctx);
   
   /* If we're swapping the buffer associated with the current context
@@ -1699,6 +1737,8 @@ void  wmCreateDIBSection(
   DWORD   dwScanWidth;
   UINT    nBypp = pwc->cColorBits / 8;
   HDC     hic;
+  (void) hDC;
+  (void) pbmi;
   
   dwScanWidth = (((pwc->ScanWidth * nBypp)+ 3) & ~3);
   
@@ -1742,14 +1782,14 @@ void  wmCreateDIBSection(
   pwc->hbmDIB = CreateDIBSection(hic,
                                 &(pwc->bmi),
                                 (iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
-                                &(pwc->pbPixels),
+                                (void **)&(pwc->pbPixels),
                                 pwc->dib.hFileMap,
                                 0);
 #else
   pwc->hbmDIB = CreateDIBSection(hic,
                                 &(pwc->bmi),
                                 (iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
-                                &(pwc->pbPixels),
+                                (void **)&(pwc->pbPixels),
                                 0,
                                 0);
 #endif // USE_MAPPED_FILE
@@ -1768,7 +1808,7 @@ void  wmCreateDIBSection(
 BOOL wmFlush(PWMC pwc)
 {
   BOOL    bRet = 0;
-  DWORD   dwErr = 0;
+/*  DWORD   dwErr = 0;*/
 #ifdef DDRAW
   HRESULT             ddrval;
 #endif
@@ -3182,8 +3222,11 @@ static void flat_DITHER8_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
 #endif
 /************** END DEAD TRIANGLE CODE ***********************/
 
+#if 0 /* unused */
+
 static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
 {
+    (void) ctx;
 #if 0
     WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
     int depth = wmesa->cColorBits;
@@ -3277,6 +3320,8 @@ static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
 #endif
 }
 
+#endif /* unused */
+
 /*
  * Define a new viewport and reallocate auxillary buffers if the size of
  * the window (color buffer) has changed.
@@ -3284,6 +3329,7 @@ static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
 void WMesaViewport( GLcontext *ctx,
                    GLint x, GLint y, GLsizei width, GLsizei height )
 {
+  (void) ctx; (void) x; (void) y; (void) width; (void) height;
   assert(0);  /* I don't think that this is being used. */
 #if 0
   /* Save viewport */
index 29fff9f4f5e69fce20ec71e59ddd733e785014a6..3c267aa0f6af452e96ba4bab61f6589125b2abdd 100644 (file)
@@ -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
 
index d60570ca69bbaeb7d2a52d958623cac05248bcf3..0f0add891554296cfbd8558b2b7dc887e6a35651 100644 (file)
@@ -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
 }
index e5e6717e835ba90141378804c82d6bd1161a6ea4..d09a44965732397040705fb63f2b9a913a42fd0e 100644 (file)
@@ -568,6 +568,7 @@ void GLAPIENTRY _mesa_noop_EvalPoint2( GLint a, GLint b )
  */
 void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
 {
+   (void) mode;
 }
 
 
index 1f9b988d334e9e6878c4f92655826c4c633e7ef7..fab1059a1829f9679f5a3da7dbee92ae619f95e9 100644 (file)
@@ -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;
 }
 
index fd3174c0fa2e5c654370efed2dc65550ce2a6a2e..0330aa47bebafe7a41956c864025a6643d2f46e4 100644 (file)
@@ -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;
index 77ac9e85bb1108ac377018c6bfc5cf6cdcc04bbd..7ce6cceed8f70485f080fea674840f0020213327 100644 (file)
@@ -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
 }
 
index ea1a6ae1215946ba414acc4bbf649ca97c04dc0b..41b47722af8b3c272f8c8e4d77c7003ff09a3a10 100644 (file)
@@ -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 */\r
        OPCODE_ACCUM,
        OPCODE_ALPHA_FUNC,
         OPCODE_BIND_TEXTURE,
index 7a5e6ff8d955a33278d0995fc2ef65eff05ecdff..38ae4df85be316c30221e1a752ee6dac62c31e52 100644 (file)
@@ -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) {
index 57fe6c3fbf7d9fc67df37e330f8d8061503ab24b..fcac043719383d6e70695e30d7265b380488ce7b 100644 (file)
@@ -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:
          {
index 0afc4ea4313e82ba03162aea1cce210fb94e3dbb..2219468f75a9bdf30e5788ccf3350f8712cc763b 100644 (file)
@@ -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;
 }
 
index 6b705f64154e63afc58d6ee40755b5c13f6577f2..62b71e49be51d4138b49a61e234d5d37cee69156 100644 (file)
@@ -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
index d7a995917df69d36a7e287dcf9b8fc647faedbd7..0cf2635765f112f9639b5d2384f726dccc1b039d 100644 (file)
@@ -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 ||
index c4fa17f22f9be0e81c8c29c13afa27ed31c0fbed..932dfce61cb6a1269d9f36b4eefe27b74439401a 100644 (file)
@@ -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++) {
index 0f3750e61caf71e192999820d40da143a12bf577..997e3829c8a863d0eeca31bb9cccec57c050308d 100644 (file)
@@ -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;
    }
 }
 
index 3d0326fccac3717c67b9d5fa5397c657721d3ef8..396f14a5663945af7168c81267ebd4318a19ef20 100644 (file)
@@ -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:
index 603f434f209e483774ee3bddcdcfbc505aa90a63..3aa5e6639883e3b4235dc60a1dc6b84031f83688 100644 (file)
@@ -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.
     */
index 08697f46c4294f94cee941fb2260582e2171429a..572cdd25614f0eaba7a5916cf6e2fee26fa163ad 100644 (file)
@@ -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;
 }
 
 
index c4f7a23e812f1f12e6b4e48e4dfb40cf7fc45e75..a496cf8cbf364e8183e81904701d270756e39879 100644 (file)
@@ -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;
index 0ccdead291b9ab755b4e43e53054b3e8a4fc37ef..d341c7864ae96f489ec3ea917ce6420cce1c62f1 100644 (file)
 #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
 
index b1f526c175d8336c17506c078539baa1d2e5d3e1..b60a91f370377a5ead70a6fb126c74cce63df5f0 100644 (file)
@@ -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 */
index 5cf71e872d87d7851460338c6ce645b5fe188628..74a5fdc06e9f91615e022eb25ac353ec24f20336 100644 (file)
@@ -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;
index c6c7cb488adf44b5f99b9c5aeddfba400b8b22b3..879f585a87f4dcf75bf7fc4025500d106a139958 100644 (file)
@@ -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;
 }
 
 
index 4f9a7c0e24fd3e94fe4aeec4a7e5c9659fab047b..e45e5ca22e2181f7db104128c1164770b652966c 100644 (file)
@@ -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 )                                                            \
index 6551798c3189026d4f06b56739e8838365c59253..de9056333b5f9f3a3ea6c68b8bf7d53ce6facd01 100644 (file)
@@ -129,6 +129,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
    GLubyte tmpAndMask = *andMask;
    GLubyte tmpOrMask = *orMask;
    GLuint i;
+   (void) proj_vec;
    STRIDE_LOOP {
       const GLfloat cx = from[0];
       const GLfloat cy = from[1];
@@ -176,6 +177,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec,
    const GLuint stride = clip_vec->stride;
    const GLuint count = clip_vec->count;
    const GLfloat *from = (GLfloat *)clip_vec->start;
+   (void) proj_vec;
 
    GLubyte tmpOrMask = *orMask;
    GLubyte tmpAndMask = *andMask;
@@ -209,6 +211,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec,
    const GLuint stride = clip_vec->stride;
    const GLuint count = clip_vec->count;
    const GLfloat *from = (GLfloat *)clip_vec->start;
+   (void) proj_vec;
 
    GLubyte tmpOrMask = *orMask;
    GLubyte tmpAndMask = *andMask;
index 7cf4780bd39441bf03ca6b08e44655311f78c004..e93837725623f17f1015c27422832dd99331b760 100644 (file)
@@ -106,6 +106,7 @@ TAG(transform_points1_identity)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint i;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
       to[i][0] = from[0];
@@ -271,6 +272,7 @@ TAG(transform_points2_identity)( GLvector4f *to_vec,
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
       to[i][0] = from[0];
@@ -441,6 +443,7 @@ TAG(transform_points3_identity)( GLvector4f *to_vec,
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
       to[i][0] = from[0];
@@ -608,6 +611,7 @@ TAG(transform_points4_identity)( GLvector4f *to_vec,
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
       to[i][0] = from[0];
@@ -740,10 +744,10 @@ TAG(transform_points4_perspective)( GLvector4f *to_vec,
    to_vec->count = from_vec->count;
 }
 
-static transform_func _XFORMAPI TAG(transform_tab_1)[7];
-static transform_func _XFORMAPI TAG(transform_tab_2)[7];
-static transform_func _XFORMAPI TAG(transform_tab_3)[7];
-static transform_func _XFORMAPI TAG(transform_tab_4)[7];
+static transform_func TAG(transform_tab_1)[7];
+static transform_func TAG(transform_tab_2)[7];
+static transform_func TAG(transform_tab_3)[7];
+static transform_func TAG(transform_tab_4)[7];
 
 /* Similar functions could be called several times, with more highly
  * optimized routines overwriting the arrays.  This only occurs during
index 7192156463ef171b96faa6930eefb27b8305e1b8..a0fc9dd5bb1f4d8b7b3bcae9988d3099126ca39e 100644 (file)
@@ -186,6 +186,7 @@ _mesa_parse_arb_fragment_program(GLcontext * ctx, GLenum target,
 {
    GLuint a, retval;
    struct arb_program ap;
+   (void) target;
 
    /* set the program target before parsing */
    ap.Base.Target = GL_FRAGMENT_PROGRAM_ARB;
index 8e8051267d4192077321a2f433fc8e85102ec011..9d78027f6369a1b6a859cf9d78260e641f10f8e8 100644 (file)
 #include "arbprogparse.h"
 #include "grammar_mesa.h"
 
+#if !defined(__GNUC__) && !defined(__extension__)
+# define __extension__
+#endif
+
 /* TODO:
  *    Fragment Program Stuff:
  *    -----------------------------------------------------
@@ -129,7 +133,7 @@ typedef GLubyte *production;
 /**
  * This is the text describing the rules to parse the grammar
  */
-static char arb_grammar_text[] =
+__extension__ static char arb_grammar_text[] =
 #include "arbprogram_syn.h"
 ;
 
@@ -591,6 +595,7 @@ parse_string (GLubyte ** inst, struct var_cache **vc_head,
 {
    GLubyte *i = *inst;
    struct var_cache *va = NULL;
+   (void) Program;
 
    *inst += _mesa_strlen ((char *) i) + 1;
 
@@ -614,7 +619,8 @@ static char *
 parse_string_without_adding (GLubyte ** inst, struct arb_program *Program)
 {
    GLubyte *i = *inst;
-
+   (void) Program;
+   
    *inst += _mesa_strlen ((char *) i) + 1;
 
    return (char *) i;
@@ -788,6 +794,7 @@ static GLuint
 parse_color_type (GLcontext * ctx, GLubyte ** inst, struct arb_program *Program,
                   GLint * color)
 {
+   (void) ctx; (void) Program;
    *color = *(*inst)++ != COLOR_PRIMARY;
    return 0;
 }
@@ -828,7 +835,7 @@ parse_texcoord_num (GLcontext * ctx, GLubyte ** inst,
 {
    GLint i = parse_integer (inst, Program);
 
-   if ((i < 0) || (i >= ctx->Const.MaxTextureUnits)) {
+   if ((i < 0) || (i >= (int)ctx->Const.MaxTextureUnits)) {
       _mesa_set_program_error (ctx, Program->Position,
                                "Invalid texture unit index");
       _mesa_error (ctx, GL_INVALID_OPERATION, "Invalid texture unit index");
@@ -1890,7 +1897,7 @@ parse_param (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head,
 
    /* Test array length here! */
    if (specified_length) {
-      if (specified_length != param_var->param_binding_length) {
+      if (specified_length != (int)param_var->param_binding_length) {
          _mesa_set_program_error (ctx, Program->Position,
                                   "Declared parameter array lenght does not match parameter list");
          _mesa_error (ctx, GL_INVALID_OPERATION,
@@ -2282,6 +2289,7 @@ parse_address_reg (GLcontext * ctx, GLubyte ** inst,
 {
    struct var_cache *dst;
    GLuint result;
+   (void) Index;
 
    dst = parse_string (inst, vc_head, Program, &result);
    Program->Position = parse_position (inst);
@@ -2492,7 +2500,7 @@ parse_src_reg (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head,
                      offset = parse_integer (inst, Program);
 
                      if ((offset < 0)
-                         || (offset >= src->param_binding_length)) {
+                         || (offset >= (int)src->param_binding_length)) {
                         _mesa_set_program_error (ctx, Program->Position,
                                                  "Index out of range");
                         _mesa_error (ctx, GL_INVALID_OPERATION,
@@ -3686,7 +3694,7 @@ parse_arb_program (GLcontext * ctx, GLubyte * inst, struct var_cache **vc_head,
 }
 
 /* XXX temporary */
-static char core_grammar_text[] =
+__extension__ static char core_grammar_text[] =
 #include "grammar_syn.h"
 ;
 
index cfad87b5b1b95243622e20944c130ec320ae8a25..d0e776b47c198a05ec162e8ff832cd35cd309b52 100644 (file)
@@ -175,6 +175,7 @@ _mesa_parse_arb_vertex_program(GLcontext * ctx, GLenum target,
 {
    GLuint retval;
    struct arb_program ap;
+   (void) target;
 
    /* set the program target before parsing */
    ap.Base.Target = GL_VERTEX_PROGRAM_ARB;
index af824f33843ab2084f3f57f79b2eb47798a9752e..fa2e96901d5441324346b982ab764ce7a8f6699f 100644 (file)
@@ -284,7 +284,7 @@ static void clear_last_error ()
 
     /* free error parameter - if error_param is a "???" don't free it - it's static */
     if (error_param != unknown)
-        mem_free ((void **) &error_param);
+        mem_free ((void **) (void *) &error_param);
     else
         error_param = NULL;
 
@@ -297,7 +297,7 @@ static void set_last_error (const byte *msg, byte *param, int pos)
     /* error message can only be set only once */
     if (error_message != NULL)
     {
-        mem_free ((void **) &param);
+        mem_free ((void **) (void *) &param);
         return;
     }
 
@@ -1230,7 +1230,7 @@ static int get_identifier (const byte **text, byte **id)
     {
         if (string_grow (&p, &len, *t++))
         {
-            mem_free ((void **) &p);
+            mem_free ((void **) (void *) &p);
             return 1;
         }
     }
@@ -1379,7 +1379,7 @@ static int get_string (const byte **text, byte **str)
 
         if (string_grow (&p, &len, c))
         {
-            mem_free ((void **) &p);
+            mem_free ((void **) (void *) &p);
             return 1;
         }
     }
@@ -1424,7 +1424,7 @@ static int get_emtcode (const byte **text, map_byte **ma)
         }
 
         m->data = (byte) c[0];
-        mem_free ((void **) &c);
+        mem_free ((void **) (void *) &c);
     }
     else
     {
@@ -1502,11 +1502,11 @@ static int get_error (const byte **text, error **er, map_str *maps)
 
     if (!str_equal ((byte *) "error", temp))
     {
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
         return 0;
     }
 
-    mem_free ((void **) &temp);
+    mem_free ((void **) (void *) &temp);
 
     error_create (er);
     if (*er == NULL)
@@ -1532,12 +1532,12 @@ static int get_error (const byte **text, error **er, map_str *maps)
 
         if (map_str_find (&maps, temp, &(**er).m_text))
         {
-            mem_free ((void **) &temp);
+            mem_free ((void **) (void *) &temp);
             error_destroy (er);
             return 1;
         }
 
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
     }
 
     /* try to extract "token" from "...$token$..." */
@@ -1558,7 +1558,7 @@ static int get_error (const byte **text, error **er, map_str *maps)
             {
                 if (string_grow (&processed, &len, '$'))
                 {
-                    mem_free ((void **) &processed);
+                    mem_free ((void **) (void *) &processed);
                     error_destroy (er);
                     return 1;
                 }
@@ -1569,7 +1569,7 @@ static int get_error (const byte **text, error **er, map_str *maps)
             {
                 if (string_grow (&processed, &len, (**er).m_text[i]))
                 {
-                    mem_free ((void **) &processed);
+                    mem_free ((void **) (void *) &processed);
                     error_destroy (er);
                     return 1;
                 }
@@ -1580,7 +1580,7 @@ static int get_error (const byte **text, error **er, map_str *maps)
             {
                 if (string_grow (&processed, &len, '$'))
                 {
-                    mem_free ((void **) &processed);
+                    mem_free ((void **) (void *) &processed);
                     error_destroy (er);
                     return 1;
                 }
@@ -1591,7 +1591,7 @@ static int get_error (const byte **text, error **er, map_str *maps)
 
                     if (string_grow (&(**er).m_token_name, &tlen, '\0'))
                     {
-                        mem_free ((void **) &processed);
+                        mem_free ((void **) (void *) &processed);
                         error_destroy (er);
                         return 1;
                     }
@@ -1603,7 +1603,7 @@ static int get_error (const byte **text, error **er, map_str *maps)
                     {
                         if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i]))
                         {
-                            mem_free ((void **) &processed);
+                            mem_free ((void **) (void *) &processed);
                             error_destroy (er);
                             return 1;
                         }
@@ -1652,11 +1652,11 @@ static int get_emits (const byte **text, emit **em, map_byte *mapb)
         dest = ed_regbyte;
     else
     {
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
         return 0;
     }
 
-    mem_free ((void **) &temp);
+    mem_free ((void **) (void *) &temp);
 
     emit_create (&e);
     if (e == NULL)
@@ -1706,7 +1706,7 @@ static int get_emits (const byte **text, emit **em, map_byte *mapb)
         }
         e->m_byte = (byte) temp[0];
 
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
 
         e->m_emit_type = et_byte;
     }
@@ -1720,12 +1720,12 @@ static int get_emits (const byte **text, emit **em, map_byte *mapb)
 
         if (map_byte_find (&mapb, temp, &e->m_byte))
         {
-            mem_free ((void **) &temp);
+            mem_free ((void **) (void *) &temp);
             emit_destroy (&e);
             return 1;
         }
 
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
 
         e->m_emit_type = et_byte;
     }
@@ -1819,7 +1819,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
             t = u;
         }
 
-        mem_free ((void **) &keyword);
+        mem_free ((void **) (void *) &keyword);
     }
 
     if (*t == '\'')
@@ -1843,7 +1843,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
 
             if (get_string (&t, &temp2))
             {
-                mem_free ((void **) &temp);
+                mem_free ((void **) (void *) &temp);
                 spec_destroy (&s);
                 return 1;
             }
@@ -1853,7 +1853,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
             s->m_byte[0] = *temp;
             s->m_byte[1] = *temp2;
 
-            mem_free ((void **) &temp2);
+            mem_free ((void **) (void *) &temp2);
         }
         else
         {
@@ -1861,7 +1861,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
             *s->m_byte = *temp;
         }
 
-        mem_free ((void **) &temp);
+        mem_free ((void **) (void *) &temp);
     }
     else if (*t == '"')
     {
@@ -1908,7 +1908,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
         {
             if (get_identifier (&t, &s->m_string))
             {
-                mem_free ((void **) &keyword);
+                mem_free ((void **) (void *) &keyword);
                 spec_destroy (&s);
                 return 1;
             }
@@ -1917,7 +1917,7 @@ static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb
             s->m_spec_type = st_identifier_loop;
         }
 
-        mem_free ((void **) &keyword);
+        mem_free ((void **) (void *) &keyword);
     }
     else
     {
@@ -1993,7 +1993,7 @@ static int get_rule (const byte **text, rule **ru, map_str *maps, map_byte *mapb
                 r->m_oper = op_or;
         }
 
-        mem_free ((void **) &op);
+        mem_free ((void **) (void *) &op);
 
         if (get_spec (&t, &sp, maps, mapb))
         {
@@ -2550,7 +2550,7 @@ grammar grammar_load_from_text (const byte *text)
         {
             map_byte *ma = NULL;
 
-            mem_free ((void **) &symbol);
+            mem_free ((void **) (void *) &symbol);
 
             if (get_emtcode (&text, &ma))
             {
@@ -2565,7 +2565,7 @@ grammar grammar_load_from_text (const byte *text)
         {
             map_byte *ma = NULL;
 
-            mem_free ((void **) &symbol);
+            mem_free ((void **) (void *) &symbol);
 
             if (get_regbyte (&text, &ma))
             {
@@ -2580,7 +2580,7 @@ grammar grammar_load_from_text (const byte *text)
         {
             map_str *ma = NULL;
 
-            mem_free ((void **) &symbol);
+            mem_free ((void **) (void *) &symbol);
 
             if (get_errtext (&text, &ma))
             {
@@ -2593,7 +2593,7 @@ grammar grammar_load_from_text (const byte *text)
         /* .string */
         else if (is_dot && str_equal (symbol, (byte *) "string"))
         {
-            mem_free ((void **) &symbol);
+            mem_free ((void **) (void *) &symbol);
 
             if (g->di->m_string != NULL)
             {
@@ -2760,7 +2760,7 @@ void grammar_get_last_error (byte *text, unsigned int size, int *pos)
     *text = '\0';
 
 #define APPEND_CHARACTER(x) if (dots_made == 0) {\
-                                if (len < size - 1) {\
+                                if (len < (int)size - 1) {\
                                     text[len++] = (x); text[len] = '\0';\
                                 } else {\
                                     int i;\
index ae26a7b5743c2ee254915ded0ea5207e5dc7ff85..8f02f228770ee9bc577fb44ff24613d566da7b13 100644 (file)
@@ -62,6 +62,7 @@
 
 /* Fragment program instruction opcodes */
 enum fp_opcode {
+   FP_OPCODE_INVALID = -1,   /* Force signed enum */
    FP_OPCODE_ABS = 1000,     /* ARB_f_p only */
    FP_OPCODE_ADD,
    FP_OPCODE_CMP,            /* ARB_f_p only */
index f92396c955d4351eff5cbbc8d76a3750bc7954ee..e10cb1ac48afb560433784aad5d49e37626e79c8 100644 (file)
@@ -358,8 +358,8 @@ store_vector4( const struct vp_dst_register *dest,
  * Set x to positive or negative infinity.
  */
 #if defined(USE_IEEE) || defined(_WIN32)
-#define SET_POS_INFINITY(x)  ( *((GLuint *) &x) = 0x7F800000 )
-#define SET_NEG_INFINITY(x)  ( *((GLuint *) &x) = 0xFF800000 )
+#define SET_POS_INFINITY(x)  ( *((GLuint *) (void *)&x) = 0x7F800000 )
+#define SET_NEG_INFINITY(x)  ( *((GLuint *) (void *)&x) = 0xFF800000 )
 #elif defined(VMS)
 #define SET_POS_INFINITY(x)  x = __MAXFLOAT
 #define SET_NEG_INFINITY(x)  x = -__MAXFLOAT
@@ -368,7 +368,7 @@ store_vector4( const struct vp_dst_register *dest,
 #define SET_NEG_INFINITY(x)  x = (GLfloat) -HUGE_VAL
 #endif
 
-#define SET_FLOAT_BITS(x, bits) ((fi_type *) &(x))->i = bits
+#define SET_FLOAT_BITS(x, bits) ((fi_type *) (void *) &(x))->i = bits
 
 
 /**
@@ -467,7 +467,7 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct vertex_program *program)
                   GLint ii = (GLint) floor_t0;
                   ii = (ii < 23) + 0x3f800000;
                   SET_FLOAT_BITS(q[0], ii);
-                  q[0] = *((GLfloat *) &ii);
+                  q[0] = *((GLfloat *) (void *)&ii);
 #else
                   q[0] = (GLfloat) pow(2.0, floor_t0);
 #endif
index aa6ea2ef0bba84fa900f7fd18d9b1852f764496a..7e8e749d8cc2685b3058f3ffd19d2b41e05306ae 100644 (file)
@@ -1023,6 +1023,7 @@ static GLboolean
 Parse_OptionSequence(struct parse_state *parseState,
                      struct vp_instruction program[])
 {
+   (void) program;
    while (1) {
       if (!Parse_String(parseState, "OPTION"))
          return GL_TRUE;  /* ok, not an OPTION statement */
index daec9252fff20b31b68f4dd95f79bf101f865a50..c451fede92345544466d581e7d9ed351d3014f34 100644 (file)
@@ -167,6 +167,7 @@ static struct program * _mesa_init_program_struct( GLcontext *ctx,
                                                   struct program *prog,
                                                   GLenum target, GLuint id)
 {
+   (void) ctx;
    if (prog) {
       prog->Id = id;
       prog->Target = target;
@@ -239,6 +240,7 @@ _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
 void
 _mesa_delete_program(GLcontext *ctx, struct program *prog)
 {
+   (void) ctx;
    ASSERT(prog);
 
    if (prog->String)
index 05a06bde53ee3111f48b22cf450b96040f2d163c..5d58c106852c2b10751a307f84a91a3c2050b167 100644 (file)
@@ -93,6 +93,7 @@ void
 _swrast_use_aux_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
+   (void) buffer;
 
    switch (bufferBit) {
    case DD_AUX0_BIT:
index 7888bb618f7d91a3069787884d11805367c670b9..26b4f902e140123c3c84f0261ca5347014cc4292 100644 (file)
@@ -176,6 +176,7 @@ _swrast_Clear( GLcontext *ctx, GLbitfield mask,
               GLint x, GLint y, GLint width, GLint height )
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
+   (void) all; (void) x; (void) y; (void) width; (void) height;
 #ifdef DEBUG
    {
       const GLbitfield legalBits =
@@ -254,6 +255,7 @@ _swrast_alloc_buffers( GLframebuffer *buffer )
 void
 _swrast_DrawBuffer( GLcontext *ctx, GLenum mode )
 {
+   (void) mode;
    _swrast_use_draw_buffer(ctx);
 }
 
index 32475cf539119b6eb3f3a5f36f22be022fda63bd..a678e0b55b25d22bbb51019fd9317d5263cf2c04 100644 (file)
@@ -403,6 +403,7 @@ _swrast_validate_texture_sample( GLcontext *ctx, GLuint texUnit,
 static void
 _swrast_sleep( GLcontext *ctx, GLuint new_state )
 {
+   (void) ctx; (void) new_state;
 }
 
 
index 0627dea9ddf01742d5d26a7028c4f21a3abaf4d4..46f59ef3c02b64a7d570be5f90542846e155ead9 100644 (file)
@@ -151,6 +151,7 @@ interpolate_colors(GLcontext *ctx, struct sw_span *span)
    const GLuint n = span->end;
    GLchan (*rgba)[4] = span->array->rgba;
    GLuint i;
+   (void) ctx;
 
    ASSERT((span->interpMask & SPAN_RGBA)  &&
          !(span->arrayMask & SPAN_RGBA));
@@ -211,6 +212,7 @@ interpolate_indexes(GLcontext *ctx, struct sw_span *span)
    const GLuint n = span->end;
    GLuint *indexes = span->array->index;
    GLuint i;
+   (void) ctx;
    ASSERT((span->interpMask & SPAN_INDEX)  &&
          !(span->arrayMask & SPAN_INDEX));
 
@@ -236,6 +238,7 @@ interpolate_indexes(GLcontext *ctx, struct sw_span *span)
 static void
 interpolate_specular(GLcontext *ctx, struct sw_span *span)
 {
+   (void) ctx;
    if (span->interpMask & SPAN_FLAT) {
       /* constant color */
       const GLchan r = FixedToChan(span->specRed);
index 3d8f550ece75373cc32f38c5bbcebca24754c62d..550a2aabdb33bd6eb763a4cb80e66c2f3ef8f2f1 100644 (file)
@@ -179,6 +179,10 @@ _swrast_execute_codegen_program( GLcontext *ctx,
                         struct fp_machine *machine, const struct sw_span *span,
                         GLuint column )
 {
+   (void) ctx;
+   (void) program; (void) maxInst;
+   (void) machine; (void) span;
+   (void) column;
    return 0;
 }
 
index 59f884c00f45889e9eefba21eaac1b3b236ef9c6..834c72c50bfaacfafd7cf4dee43a1d1df33b3897 100644 (file)
@@ -456,6 +456,7 @@ sample_1d_nearest(GLcontext *ctx,
 {
    const GLint width = img->Width2;  /* without border, power of two */
    GLint i;
+   (void) ctx;
 
    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width, i);
 
@@ -486,6 +487,7 @@ sample_1d_linear(GLcontext *ctx,
    GLint i0, i1;
    GLfloat u;
    GLuint useBorderColor;
+   (void) ctx;
 
    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width, i0, i1);
 
@@ -657,6 +659,7 @@ sample_nearest_1d( GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_1d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -673,6 +676,7 @@ sample_linear_1d( GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_1d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -774,6 +778,7 @@ sample_2d_nearest(GLcontext *ctx,
    const GLint width = img->Width2;    /* without border, power of two */
    const GLint height = img->Height2;  /* without border, power of two */
    GLint i, j;
+   (void) ctx;
 
    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width,  i);
    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
@@ -809,6 +814,7 @@ sample_2d_linear(GLcontext *ctx,
    GLint i0, j0, i1, j1;
    GLuint useBorderColor;
    GLfloat u, v;
+   (void) ctx;
 
    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width,  i0, i1);
    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
@@ -917,7 +923,9 @@ sample_2d_linear_repeat(GLcontext *ctx,
    const GLint height = img->Height2;
    GLint i0, j0, i1, j1;
    GLfloat u, v;
-
+   (void) ctx;
+   (void) tObj;
+   
    ASSERT(tObj->WrapS == GL_REPEAT);
    ASSERT(tObj->WrapT == GL_REPEAT);
    ASSERT(img->Border == 0);
@@ -1117,6 +1125,7 @@ sample_nearest_2d( GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_2d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -1133,6 +1142,7 @@ sample_linear_2d( GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_2d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -1161,6 +1171,8 @@ opt_sample_rgb_2d( GLcontext *ctx, GLuint texUnit,
    const GLint rowMask = img->Height - 1;
    const GLint shift = img->WidthLog2;
    GLuint k;
+   (void) ctx;
+   (void) texUnit;
    (void) lambda;
    ASSERT(tObj->WrapS==GL_REPEAT);
    ASSERT(tObj->WrapT==GL_REPEAT);
@@ -1201,6 +1213,8 @@ opt_sample_rgba_2d( GLcontext *ctx, GLuint texUnit,
    const GLint rowMask = img->Height - 1;
    const GLint shift = img->WidthLog2;
    GLuint i;
+   (void) ctx;
+   (void) texUnit;
    (void) lambda;
    ASSERT(tObj->WrapS==GL_REPEAT);
    ASSERT(tObj->WrapT==GL_REPEAT);
@@ -1366,6 +1380,7 @@ sample_3d_nearest(GLcontext *ctx,
    const GLint height = img->Height2;   /* without border, power of two */
    const GLint depth = img->Depth2;     /* without border, power of two */
    GLint i, j, k;
+   (void) ctx;
 
    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width,  i);
    COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
@@ -1400,6 +1415,7 @@ sample_3d_linear(GLcontext *ctx,
    GLint i0, j0, k0, i1, j1, k1;
    GLuint useBorderColor;
    GLfloat u, v, w;
+   (void) ctx;
 
    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width,  i0, i1);
    COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
@@ -1651,6 +1667,7 @@ sample_nearest_3d(GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -1667,6 +1684,7 @@ sample_linear_3d( GLcontext *ctx, GLuint texUnit,
 {
    GLuint i;
    struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+   (void) texUnit;
    (void) lambda;
    for (i=0;i<n;i++) {
       sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
@@ -1836,6 +1854,7 @@ sample_nearest_cube(GLcontext *ctx, GLuint texUnit,
                     GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    (void) lambda;
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -1854,6 +1873,7 @@ sample_linear_cube(GLcontext *ctx, GLuint texUnit,
                   const GLfloat lambda[], GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    (void) lambda;
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -1872,6 +1892,7 @@ sample_cube_nearest_mipmap_nearest(GLcontext *ctx, GLuint texUnit,
                                    const GLfloat lambda[], GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    ASSERT(lambda != NULL);
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -1891,6 +1912,7 @@ sample_cube_linear_mipmap_nearest(GLcontext *ctx, GLuint texUnit,
                                   const GLfloat lambda[], GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    ASSERT(lambda != NULL);
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -1910,6 +1932,7 @@ sample_cube_nearest_mipmap_linear(GLcontext *ctx, GLuint texUnit,
                                   const GLfloat lambda[], GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    ASSERT(lambda != NULL);
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -1942,6 +1965,7 @@ sample_cube_linear_mipmap_linear(GLcontext *ctx, GLuint texUnit,
                                  const GLfloat lambda[], GLchan rgba[][4])
 {
    GLuint i;
+   (void) texUnit;
    ASSERT(lambda != NULL);
    for (i = 0; i < n; i++) {
       const struct gl_texture_image **images;
@@ -2053,6 +2077,7 @@ sample_nearest_rect(GLcontext *ctx, GLuint texUnit,
    const GLint height_minus_1 = img->Height - 1;
    GLuint i;
 
+   (void) ctx;
    (void) texUnit;
    (void) lambda;
 
@@ -2108,6 +2133,7 @@ sample_linear_rect(GLcontext *ctx, GLuint texUnit,
    const GLint height_minus_1 = img->Height - 1;
    GLuint i;
 
+   (void) ctx;
    (void) texUnit;
    (void) lambda;
 
@@ -2284,6 +2310,7 @@ sample_depth_texture( GLcontext *ctx, GLuint unit,
    GLenum function;
    GLchan result;
 
+   (void) lambda;
    (void) unit;
 
    ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT);
@@ -3494,6 +3521,7 @@ texture_apply( const GLcontext *ctx,
    GLuint i;
    GLint Rc, Gc, Bc, Ac;
    GLenum format;
+   (void) primary_rgba;
 
    ASSERT(texUnit);
    ASSERT(texUnit->_Current);
index 5c8d1ebe294eeaaf69519fc2e04c1859b1191c76..a1a629c18d284c75b5e1120adf4079231a7c4360 100644 (file)
@@ -927,7 +927,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
       const GLuint *zRow = (const GLuint *)                            \
          _swrast_zbuffer_address(ctx, span.x, span.y);                 \
       for (i = 0; i < span.end; i++) {                                 \
-         if (span.z < zRow[i]) {                                       \
+         if ((GLuint)span.z < zRow[i]) {                               \
             ctx->OcclusionResult = GL_TRUE;                            \
             ctx->Occlusion.PassedCounter++;                            \
          }                                                             \
index cc709d3641d5d7cb7de76bc89fae0dbecf676040..c3e6358221417e5b26a70963f7a5f6f443ed5ff5 100644 (file)
@@ -438,4 +438,5 @@ void _tnl_array_init( GLcontext *ctx )
  */
 void _tnl_array_destroy( GLcontext *ctx )
 {
+   (void) ctx;
 }
index 0e50c6fa9a19b24defada4554c838cae2ed35b5f..dac646315589afae6fabd331b6389b1b91ad31fb 100644 (file)
@@ -201,6 +201,7 @@ static void _tnl_import_edgeflag( GLcontext *ctx,
    struct gl_client_array *tmp;
    GLboolean is_writeable = 0;
    const GLubyte *data;
+   (void) writeable; (void) stride;
 
    tmp = _ac_import_edgeflag(ctx, GL_UNSIGNED_BYTE,
                             sizeof(GLubyte),
index 14a7d6089be029568006805a0cdf7d651482ca1f..7e4f3fd23994c1b37dfbf603b687fa55f56709d2 100644 (file)
@@ -51,6 +51,7 @@ _tnl_MakeCurrent( GLcontext *ctx,
                  GLframebuffer *drawBuffer,
                  GLframebuffer *readBuffer )
 {
+   (void) ctx; (void) drawBuffer; (void) readBuffer;
 }
 
 
index c40de16fcac489f351b170f6251bd7745775f344..5a7e6b5666ba3e7c0a20f6f4b3899b48b5920cf7 100644 (file)
@@ -179,6 +179,7 @@ build_normal_lengths( struct tnl_vertex_list *node )
 static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
 {
    struct tnl_vertex_store *store = MALLOC_STRUCT(tnl_vertex_store);
+   (void) ctx;
    store->used = 0;
    store->refcount = 1;
    return store;
@@ -187,6 +188,7 @@ static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
 static struct tnl_primitive_store *alloc_prim_store( GLcontext *ctx )
 {
    struct tnl_primitive_store *store = MALLOC_STRUCT(tnl_primitive_store);
+   (void) ctx;
    store->used = 0;
    store->refcount = 1;
    return store;
@@ -1241,6 +1243,7 @@ static void GLAPIENTRY _save_DrawElements(GLenum mode, GLsizei count, GLenum typ
                               const GLvoid *indices)
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) mode; (void) count; (void) type; (void) indices;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawElements" );
 }
 
@@ -1251,24 +1254,28 @@ static void GLAPIENTRY _save_DrawRangeElements(GLenum mode,
                                    const GLvoid *indices)
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawRangeElements" );
 }
 
 static void GLAPIENTRY _save_DrawArrays(GLenum mode, GLint start, GLsizei count)
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) mode; (void) start; (void) count;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawArrays" );
 }
 
 static void GLAPIENTRY _save_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) x1; (void) y1; (void) x2; (void) y2;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glRectf" );
 }
 
 static void GLAPIENTRY _save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) mode; (void) i1; (void) i2;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh1" );
 }
 
@@ -1276,12 +1283,14 @@ static void GLAPIENTRY _save_EvalMesh2( GLenum mode, GLint i1, GLint i2,
                                  GLint j1, GLint j2 )
 {
    GET_CURRENT_CONTEXT(ctx);
+   (void) mode; (void) i1; (void) i2; (void) j1; (void) j2;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
 }
 
 static void GLAPIENTRY _save_Begin( GLenum mode )
 {
    GET_CURRENT_CONTEXT( ctx );
+   (void) mode;
    _mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive glBegin" );
 }
 
@@ -1467,6 +1476,8 @@ void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
 
+   (void) list; (void) mode;
+
    if (!tnl->save.prim_store)
       tnl->save.prim_store = alloc_prim_store( ctx );
 
@@ -1481,21 +1492,25 @@ void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
 
 void _tnl_EndList( GLcontext *ctx )
 {
+   (void) ctx;
    assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
 }
  
 void _tnl_BeginCallList( GLcontext *ctx, GLuint list )
 {
+   (void) ctx; (void) list;
 }
 
 void _tnl_EndCallList( GLcontext *ctx )
 {
+   (void) ctx;
 }
 
 
 static void _tnl_destroy_vertex_list( GLcontext *ctx, void *data )
 {
    struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
+   (void) ctx;
 
    if ( --node->vertex_store->refcount == 0 )
       FREE( node->vertex_store );
@@ -1512,6 +1527,7 @@ static void _tnl_print_vertex_list( GLcontext *ctx, void *data )
 {
    struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
    GLuint i;
+   (void) ctx;
 
    _mesa_debug(0, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
                node->count,
@@ -1597,4 +1613,5 @@ void _tnl_save_init( GLcontext *ctx )
  */
 void _tnl_save_destroy( GLcontext *ctx )
 {
+   (void) ctx;
 }
index 088b73609a6d1372ea63c8771fdf57affd7c5baa..18ecc3514fa1af105c05d400c228f6dd00b5aa80 100644 (file)
@@ -164,11 +164,13 @@ static attr_func mat_attrfunc[4] = {
 
 static void index_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
 {
+   (void) target;
    ctx->Exec->Indexf(v[0]);
 }
 
 static void edgeflag_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
 {
+   (void) target;
    ctx->Exec->EdgeFlag((GLboolean)(v[0] == 1.0));
 }
 
index cbeb9d5f71fafd5aa75d8d0f1cc20636942e8b08..44a09f56c07bd5600fd5203d3041cfa3db77d467 100644 (file)
@@ -353,6 +353,7 @@ static void check_render( GLcontext *ctx, struct tnl_pipeline_stage *stage )
 
 static void dtr( struct tnl_pipeline_stage *stage )
 {
+   (void) stage;
 }
 
 
index bfa96a457d4280bf44caff21c9e1959b442408cc..7147193a0d6c16c002603d249dc2ad210a89b362 100644 (file)
@@ -160,6 +160,7 @@ static void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -170,6 +171,7 @@ static void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -180,6 +182,7 @@ static void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -190,6 +193,7 @@ static void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = 0;
@@ -200,6 +204,7 @@ static void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -208,12 +213,14 @@ static void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, con
 
 static void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
+   (void) a; (void) v; (void) in;
    abort();
 }
 
 static void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -223,6 +230,7 @@ static void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -232,6 +240,7 @@ static void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = 0;
@@ -242,6 +251,7 @@ static void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -250,6 +260,7 @@ static void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
+   (void) a;
    
    out[0] = in[0];
    out[1] = 0;
@@ -258,7 +269,8 @@ static void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const G
 static void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
 {
    GLfloat *out = (GLfloat *)(v);
-   
+   (void) a;
+
    out[0] = in[0];
 }
 
@@ -266,6 +278,7 @@ static void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte
                                  const GLfloat *in )
 {
    GLchan *c = (GLchan *)v;
+   (void) a;
    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
    UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]); 
@@ -276,6 +289,7 @@ static void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte
                                  const GLfloat *in )
 {
    GLchan *c = (GLchan *)v;
+   (void) a;
    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
    UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]); 
@@ -286,6 +300,7 @@ static void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte
                                  const GLfloat *in )
 {
    GLchan *c = (GLchan *)v;
+   (void) a;
    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
    UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]); 
    c[2] = 0;
@@ -296,6 +311,7 @@ static void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte
                                  const GLfloat *in )
 {
    GLchan *c = (GLchan *)v;
+   (void) a;
    UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]); 
    c[1] = 0;
    c[2] = 0;
@@ -305,6 +321,7 @@ static void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte
 static void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
@@ -314,6 +331,7 @@ static void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
@@ -323,6 +341,7 @@ static void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    v[2] = 0;
@@ -332,6 +351,7 @@ static void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    v[1] = 0;
    v[2] = 0;
@@ -341,6 +361,7 @@ static void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
@@ -350,6 +371,7 @@ static void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
@@ -359,6 +381,7 @@ static void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    v[0] = 0;
@@ -368,6 +391,7 @@ static void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    v[1] = 0;
    v[0] = 0;
@@ -377,6 +401,7 @@ static void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v
 static void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
                               const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
@@ -385,6 +410,7 @@ static void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
                               const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    v[2] = 0;
@@ -393,6 +419,7 @@ static void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
                               const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
    v[1] = 0;
    v[2] = 0;
@@ -401,6 +428,7 @@ static void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                 const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
@@ -409,6 +437,7 @@ static void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                 const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
    v[0] = 0;
@@ -417,6 +446,7 @@ static void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
                                 const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
    v[1] = 0;
    v[0] = 0;
@@ -426,6 +456,7 @@ static void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
 static void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, 
                           const GLfloat *in )
 {
+   (void) a;
    UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
 }
 
@@ -481,6 +512,7 @@ static void extract_2f_viewport( const struct tnl_clipspace_attr *a, GLfloat *ou
 static void extract_4f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v  )
 {
    const GLfloat *in = (const GLfloat *)v;
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -491,6 +523,7 @@ static void extract_4f( const struct tnl_clipspace_attr *a, GLfloat *out, const
 static void extract_3f_xyw( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
 {
    const GLfloat *in = (const GLfloat *)v;
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -502,6 +535,7 @@ static void extract_3f_xyw( const struct tnl_clipspace_attr *a, GLfloat *out, co
 static void extract_3f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
 {
    const GLfloat *in = (const GLfloat *)v;
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -513,6 +547,7 @@ static void extract_3f( const struct tnl_clipspace_attr *a, GLfloat *out, const
 static void extract_2f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
 {
    const GLfloat *in = (const GLfloat *)v;
+   (void) a;
    
    out[0] = in[0];
    out[1] = in[1];
@@ -523,6 +558,7 @@ static void extract_2f( const struct tnl_clipspace_attr *a, GLfloat *out, const
 static void extract_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
 {
    const GLfloat *in = (const GLfloat *)v;
+   (void) a;
    
    out[0] = in[0];
    out[1] = 0;
@@ -534,6 +570,7 @@ static void extract_4chan_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *
                                 const GLubyte *v )
 {
    GLchan *c = (GLchan *)v;
+   (void) a;
 
    out[0] = CHAN_TO_FLOAT(c[0]);
    out[1] = CHAN_TO_FLOAT(c[1]);
@@ -544,6 +581,7 @@ static void extract_4chan_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *
 static void extract_4ub_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *out, 
                                 const GLubyte *v )
 {
+   (void) a;
    out[0] = UBYTE_TO_FLOAT(v[0]);
    out[1] = UBYTE_TO_FLOAT(v[1]);
    out[2] = UBYTE_TO_FLOAT(v[2]);
@@ -553,6 +591,7 @@ static void extract_4ub_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *ou
 static void extract_4ub_4f_bgra( const struct tnl_clipspace_attr *a, GLfloat *out, 
                                 const GLubyte *v )
 {
+   (void) a;
    out[2] = UBYTE_TO_FLOAT(v[0]);
    out[1] = UBYTE_TO_FLOAT(v[1]);
    out[0] = UBYTE_TO_FLOAT(v[2]);
@@ -562,6 +601,7 @@ static void extract_4ub_4f_bgra( const struct tnl_clipspace_attr *a, GLfloat *ou
 static void extract_3ub_3f_rgb( const struct tnl_clipspace_attr *a, GLfloat *out, 
                                const GLubyte *v )
 {
+   (void) a;
    out[0] = UBYTE_TO_FLOAT(v[0]);
    out[1] = UBYTE_TO_FLOAT(v[1]);
    out[2] = UBYTE_TO_FLOAT(v[2]);
@@ -571,6 +611,7 @@ static void extract_3ub_3f_rgb( const struct tnl_clipspace_attr *a, GLfloat *out
 static void extract_3ub_3f_bgr( const struct tnl_clipspace_attr *a, GLfloat *out, 
                                const GLubyte *v )
 {
+   (void) a;
    out[2] = UBYTE_TO_FLOAT(v[0]);
    out[1] = UBYTE_TO_FLOAT(v[1]);
    out[0] = UBYTE_TO_FLOAT(v[2]);
@@ -579,6 +620,7 @@ static void extract_3ub_3f_bgr( const struct tnl_clipspace_attr *a, GLfloat *out
 
 static void extract_1ub_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
 {
+   (void) a;
    out[0] = UBYTE_TO_FLOAT(v[0]);
    out[1] = 0;
    out[2] = 0;
@@ -731,6 +773,7 @@ static void generic_interp( GLcontext *ctx,
    const struct tnl_clipspace_attr *a = vtx->attr;
    const GLuint attr_count = vtx->attr_count;
    GLuint j;
+   (void) force_boundary;
 
    if (tnl->NeedNdcCoords) {
       const GLfloat *dstclip = VB->ClipPtr->data[edst];
index e3e7f2ef1d2c89d8ffb484ce829bf0142e024c53..4ff96430700825549a6fdddbebce9155390fe4b6 100644 (file)
@@ -161,6 +161,7 @@ static GLboolean emit_3f_xyw_4( struct tnl_clipspace_codegen *p )
 
 static GLboolean emit_3f_xyw_err( struct tnl_clipspace_codegen *p )
 {
+   (void) p;
    assert(0);
    return GL_FALSE;
 }
index e75ac5b3397963456c3e87b0ada6f8a6a61d9ba1..a6b8cc301308f5c633a9ed2ba06e868291df9b34 100644 (file)
@@ -345,6 +345,7 @@ static void _tnl_fixup_vertex( GLcontext *ctx, GLuint attr, GLuint sz )
       ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
 }
 
+#ifdef USE_X86_ASM
 
 static struct _tnl_dynfn *lookup( struct _tnl_dynfn *l, GLuint key )
 {
@@ -382,11 +383,13 @@ static tnl_attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz )
    }
 
    if (dfn) 
-      return (tnl_attrfv_func) dfn->code;
+      return *(tnl_attrfv_func *) &dfn->code;
    else
       return 0;
 }
 
+#endif /* USE_X86_ASM */
+
 /* Helper function for 'CHOOSE' macro.  Do what's necessary when an
  * entrypoint is called for the first time.
  */
@@ -824,6 +827,7 @@ static void _tnl_exec_vtxfmt_init( GLcontext *ctx )
 void _tnl_FlushVertices( GLcontext *ctx, GLuint flags )
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
+   (void) flags;
 
    if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END)
       return;
@@ -860,6 +864,7 @@ static void _tnl_current_init( GLcontext *ctx )
 
 static struct _tnl_dynfn *no_codegen( GLcontext *ctx, int key )
 {
+   (void) ctx; (void) key;
    return 0;
 }