From a6c423d95663cfd8601cf84e10e8e1b12fa6ef15 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 25 Aug 2004 15:59:48 +0000 Subject: Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696) --- src/mesa/drivers/windows/gdi/wmesa.c | 88 +++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 21 deletions(-) (limited to 'src/mesa/drivers/windows/gdi/wmesa.c') diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index eb64cf69a5..53d202251a 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -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; iScreenMem+FLIP(y)*Current->ScanWidth+x; + (void) ctx; assert(Current->rgb_flag==GL_FALSE); for (i=0; iScreenMem+FLIP(y)*Current->ScanWidth+x; + (void) ctx; assert(Current->rgb_flag==GL_FALSE); for (i=0; irgb_flag==GL_TRUE) { GLuint i; - HDC DC=DD_GETDC; + /*HDC DC=DD_GETDC;*/ y=FLIP(y); if (mask) { for (i=0; irgb_flag==GL_TRUE) { GLuint i; - HDC DC=DD_GETDC; + /*HDC DC=DD_GETDC;*/ y=FLIP(y); if (mask) { for (i=0; irgb_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; irgb_flag==GL_FALSE); for (i=0; irgb_flag==GL_TRUE); for (i=0; irgb_flag==GL_TRUE); for (i=0; iScreenMem+FLIP(y)*Current->ScanWidth+x; assert(Current->rgb_flag==GL_FALSE); for (i=0; irgb_flag==GL_FALSE); for (i=0; irgb_flag==GL_TRUE); y = Current->height - y - 1; for (i=0; irgb_flag==GL_TRUE); for (i=0; ihDC; +/* 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 */ -- cgit v1.2.3