Mesa (master): st/mesa: remove set-but-unused variables

Marek Olšák mareko at kemper.freedesktop.org
Sun May 1 12:32:11 UTC 2011


Module: Mesa
Branch: master
Commit: fb8786bda320fef12219bf71ea83d703be6aa48f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb8786bda320fef12219bf71ea83d703be6aa48f

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun May  1 14:31:41 2011 +0200

st/mesa: remove set-but-unused variables

---

 src/mesa/state_tracker/st_atom_pixeltransfer.c |   10 ----------
 src/mesa/state_tracker/st_cb_drawpixels.c      |    2 --
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 9557adc..57430b3 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -195,18 +195,8 @@ get_pixel_transfer_program(struct gl_context *ctx, const struct state_key *key)
          { STATE_INTERNAL, STATE_PT_SCALE, 0, 0, 0 };
       static const gl_state_index bias_state[STATE_LENGTH] =
          { STATE_INTERNAL, STATE_PT_BIAS, 0, 0, 0 };
-      GLfloat scale[4], bias[4];
       GLint scale_p, bias_p;
 
-      scale[0] = ctx->Pixel.RedScale;
-      scale[1] = ctx->Pixel.GreenScale;
-      scale[2] = ctx->Pixel.BlueScale;
-      scale[3] = ctx->Pixel.AlphaScale;
-      bias[0] = ctx->Pixel.RedBias;
-      bias[1] = ctx->Pixel.GreenBias;
-      bias[2] = ctx->Pixel.BlueBias;
-      bias[3] = ctx->Pixel.AlphaBias;
-
       scale_p = _mesa_add_state_reference(params, scale_state);
       bias_p = _mesa_add_state_reference(params, bias_state);
 
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 31360fd..e377861 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -419,7 +419,6 @@ make_texture(struct st_context *st,
    gl_format mformat;
    struct pipe_resource *pt;
    enum pipe_format pipeFormat;
-   GLuint cpp;
    GLenum baseFormat, intFormat;
 
    baseFormat = base_format(format);
@@ -431,7 +430,6 @@ make_texture(struct st_context *st,
 
    pipeFormat = st_mesa_format_to_pipe_format(mformat);
    assert(pipeFormat);
-   cpp = util_format_get_blocksize(pipeFormat);
 
    pixels = _mesa_map_pbo_source(ctx, unpack, pixels);
    if (!pixels)




More information about the mesa-commit mailing list