summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-07-20 10:06:32 +1000
committerTimothy Arceri <[email protected]>2017-07-26 10:39:52 +1000
commit7ee383669fc34a9ebe1e722da47673025dbf72a5 (patch)
tree56f9f5683ed03b5e1823134e8f8e9624b5514c1e
parent87e5f39cf1777a7fd3d8fc3c5fbc969ed743ea05 (diff)
mesa/st: fix unused variable warnings
Reviewed-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c5
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c9
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
-rw-r--r--src/mesa/state_tracker/st_format.c5
4 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 7ba6d825c12..a5c7ed0ee66 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -301,8 +301,9 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* XXX if the bitmap is larger than the max texture size, break
* it up into chunks.
*/
- GLuint maxSize = 1 << (pipe->screen->get_param(pipe->screen,
- PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ GLuint MAYBE_UNUSED maxSize =
+ 1 << (pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
assert(width <= (GLsizei) maxSize);
assert(height <= (GLsizei) maxSize);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 384f965474a..1d88976ed98 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -464,7 +464,6 @@ make_texture(struct st_context *st,
{
struct pipe_transfer *transfer;
- GLboolean success;
GLubyte *dest;
const GLbitfield imageTransferStateSave = ctx->_ImageTransferState;
@@ -497,9 +496,9 @@ make_texture(struct st_context *st,
format, type, /* src format/type */
pixels, /* data source */
unpack);
- success = GL_TRUE;
}
else {
+ bool MAYBE_UNUSED success;
success = _mesa_texstore(ctx, 2, /* dims */
baseInternalFormat, /* baseInternalFormat */
mformat, /* mesa_format */
@@ -509,13 +508,13 @@ make_texture(struct st_context *st,
format, type, /* src format/type */
pixels, /* data source */
unpack);
+
+ assert(success);
}
/* unmap */
pipe_transfer_unmap(pipe, transfer);
- assert(success);
-
/* restore */
ctx->_ImageTransferState = imageTransferStateSave;
}
@@ -570,7 +569,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
const unsigned fb_width = _mesa_geometric_width(ctx->DrawBuffer);
const unsigned fb_height = _mesa_geometric_height(ctx->DrawBuffer);
GLfloat x0, y0, x1, y1;
- GLsizei maxSize;
+ GLsizei MAYBE_UNUSED maxSize;
boolean normalized = sv[0]->texture->target == PIPE_TEXTURE_2D;
unsigned cso_state_mask;
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index f66e1bd0cbe..d0a7b55c587 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -2396,7 +2396,7 @@ copy_image_data_to_texture(struct st_context *st,
{
/* debug checks */
{
- const struct gl_texture_image *dstImage =
+ const struct gl_texture_image MAYBE_UNUSED *dstImage =
stObj->base.Image[stImage->base.Face][dstLevel];
assert(dstImage);
assert(dstImage->Width == stImage->base.Width);
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 64a3a812791..348853affd8 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -1028,7 +1028,7 @@ test_format_conversion(struct st_context *st)
pf = st_mesa_format_to_pipe_format(st, i);
if (pf != PIPE_FORMAT_NONE) {
- mesa_format mf = st_pipe_format_to_mesa_format(pf);
+ mesa_format MAYBE_UNUSED mf = st_pipe_format_to_mesa_format(pf);
assert(mf == i);
}
}
@@ -1044,7 +1044,8 @@ test_format_conversion(struct st_context *st)
continue;
if (mf != MESA_FORMAT_NONE) {
- enum pipe_format pf = st_mesa_format_to_pipe_format(st, mf);
+ enum pipe_format MAYBE_UNUSED pf =
+ st_mesa_format_to_pipe_format(st, mf);
assert(pf == i);
}
}