summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2022-11-04 20:45:44 +0800
committerMarge Bot <emma+marge@anholt.net>2022-11-17 23:17:40 +0000
commite8a2f801af67630f7f767c3624b5c0c08ca70c96 (patch)
tree3f3d3cffefeeb9a6055e1eb983b18459d6dc8565
parentaf082cb69c930928a2d9352b9237c758d0b34292 (diff)
softpipe: fixes -Werror,-Wunused-but-set-variable for clang-15 in sp_tile_cache.c
error message: ../../src/gallium/drivers/softpipe/sp_tile_cache.c:346:9: error: variable 'numCleared' set but not used [-Werror,-Wunused-but-set-variable] uint numCleared = 0; ^ Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19527>
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index b185320a36b..33f58bccaf8 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -343,7 +343,7 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc, int layer)
const uint w = tc->transfer[layer]->box.width;
const uint h = tc->transfer[layer]->box.height;
uint x, y;
- uint numCleared = 0;
+ UNUSED uint numCleared = 0;
assert(pt->resource);
@@ -414,11 +414,11 @@ sp_flush_tile(struct softpipe_tile_cache* tc, unsigned pos)
void
sp_flush_tile_cache(struct softpipe_tile_cache *tc)
{
- int inuse = 0, pos;
+ UNUSED int inuse = 0;
int i;
if (tc->num_maps) {
/* caching a drawing transfer */
- for (pos = 0; pos < ARRAY_SIZE(tc->entries); pos++) {
+ for (int pos = 0; pos < ARRAY_SIZE(tc->entries); pos++) {
struct softpipe_cached_tile *tile = tc->entries[pos];
if (!tile)
{