From b305028464f02947c0cce0476af0e35f4ed1fafa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 4 Dec 2003 03:19:46 +0000 Subject: Port over changes from XFree86/Mesa 5.0.2, mostly to silence compiler warnings. --- src/mesa/main/convolve.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/mesa/main/convolve.c') diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c index b7d2eeb20f..e6b19fabd4 100644 --- a/src/mesa/main/convolve.c +++ b/src/mesa/main/convolve.c @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 4.1 + * Version: 5.1 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -178,7 +177,7 @@ void GLAPIENTRY _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) { GLint baseFormat; - GLint i, components; + GLint i; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -215,8 +214,8 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G return; } - components = _mesa_components_in_format(format); - assert(components > 0); /* this should have been caught earlier */ + /* this should have been caught earlier */ + assert(_mesa_components_in_format(format)); ctx->Convolution2D.Format = format; ctx->Convolution2D.InternalFormat = internalFormat; @@ -304,22 +303,18 @@ void GLAPIENTRY _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - struct gl_convolution_attrib *conv; GLuint c; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); switch (target) { case GL_CONVOLUTION_1D: c = 0; - conv = &ctx->Convolution1D; break; case GL_CONVOLUTION_2D: c = 1; - conv = &ctx->Convolution2D; break; case GL_SEPARABLE_2D: c = 2; - conv = &ctx->Separable2D; break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)"); @@ -403,22 +398,18 @@ void GLAPIENTRY _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) { GET_CURRENT_CONTEXT(ctx); - struct gl_convolution_attrib *conv; GLuint c; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); switch (target) { case GL_CONVOLUTION_1D: c = 0; - conv = &ctx->Convolution1D; break; case GL_CONVOLUTION_2D: c = 1; - conv = &ctx->Convolution2D; break; case GL_SEPARABLE_2D: c = 2; - conv = &ctx->Separable2D; break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)"); -- cgit v1.2.3