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>
This commit is contained in:
Yonggang Luo
2022-11-04 20:45:44 +08:00
committed by Marge Bot
parent af082cb69c
commit e8a2f801af
+3 -3
View File
@@ -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)
{