[Mesa-dev] [PATCH] mesa: Silence GCC unused variable warnings.

Brian Paul brianp at vmware.com
Tue Jan 3 06:37:33 PST 2012


On 01/03/2012 01:03 AM, Vinson Lee wrote:
> Silences these GCC warnings.
> warning: unused variable 'texelBytes'
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   src/mesa/main/texstore.c |   34 ++++++++++++++++++++++++++++++++++
>   1 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
> index bb2fe25..90aa97d 100644
> --- a/src/mesa/main/texstore.c
> +++ b/src/mesa/main/texstore.c
> @@ -981,6 +981,7 @@ _mesa_texstore_z32(TEXSTORE_PARAMS)
>      ASSERT(dstFormat == MESA_FORMAT_Z32 ||
>             dstFormat == MESA_FORMAT_Z32_FLOAT);
>      ASSERT(texelBytes == sizeof(GLuint));
> +   (void) texelBytes;
[...]

Hi Vinson,

Let's just remove the texelBytes declarations where they're only used 
for assertions.  I don't think they really serve any useful purpose 
anymore.

Thanks.

-Brian


More information about the mesa-dev mailing list