r600: Fixes -Werror,-Wunused-but-set-variable for clang-15

one of the error messages:
../../src/gallium/drivers/r600/r600_asm.c:2528:8: error: variable 'o' set but not used [-Werror,-Wunused-but-set-variable]
                        int o = 0;
                            ^

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
This commit is contained in:
Yonggang Luo
2022-11-04 15:13:28 +08:00
committed by Marge Bot
parent cdbe1ad570
commit 970c8dfd98
5 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -2582,7 +2582,7 @@ void r600_bytecode_disasm(struct r600_bytecode *bc)
}
LIST_FOR_EACH_ENTRY(gds, &cf->gds, list) {
int o = 0;
UNUSED int o = 0;
o += fprintf(stderr, " %04d %08X %08X %08X ", id, bc->bytecode[id],
bc->bytecode[id + 1], bc->bytecode[id + 2]);
+1 -1
View File
@@ -254,7 +254,7 @@ int bc_parser::decode_alu_clause(cf_node* cf) {
cgroup = 0;
memset(slots[0], 0, 5*sizeof(slots[0][0]));
unsigned ng = 0;
UNUSED unsigned ng = 0;
do {
decode_alu_group(cf, i, gcnt);
@@ -41,7 +41,7 @@ int if_conversion::run() {
regions_vec &rv = sh.get_regions();
unsigned converted = 0;
UNUSED unsigned converted = 0;
for (regions_vec::reverse_iterator I = rv.rbegin(); I != rv.rend(); ) {
region_node *r = *I;
if (run_on(r)) {
+1 -1
View File
@@ -516,7 +516,7 @@ bool alu_group_tracker::try_reserve(alu_node* n) {
gpr.reset();
slots[slot] = n;
unsigned forced_swz_slots = 0;
UNUSED unsigned forced_swz_slots = 0;
int first_slot = ~0, first_nf = ~0, last_slot = ~0;
unsigned save_bs[5];
@@ -489,10 +489,6 @@ TexInstr::emit_set_offsets(
for (int i = 0; i < src_components; ++i)
swizzle[i] = i;
int noffsets = tex->coord_components;
if (tex->is_array)
--noffsets;
auto ofs = shader.value_factory().src_vec4(*src.offset, pin_group, swizzle);
RegisterVec4 empty_dst(0, false, {0, 0, 0, 0}, pin_group);