freedreno: silence sometimes-uninitialized warning

Clang does not see that this is unreachable and thus
thinks that opc will be used uninitialized later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14500>
This commit is contained in:
Thomas H.P. Andersen 2022-01-11 21:44:20 +01:00 committed by Marge Bot
parent 50d4e44fa4
commit d71c6eebe2
1 changed files with 4 additions and 0 deletions

View File

@ -248,6 +248,8 @@ emit_instructions(int outfd)
opc = OPC_STORE6;
} else if (ai->tok == T_OP_LOAD) {
opc = OPC_LOAD6;
} else {
unreachable("");
}
} else {
if (ai->tok == T_OP_CWRITE) {
@ -257,6 +259,8 @@ emit_instructions(int outfd)
} else if (ai->tok == T_OP_STORE || ai->tok == T_OP_LOAD) {
fprintf(stderr, "load and store do not exist on a5xx\n");
exit(1);
} else {
unreachable("");
}
}
instr.control.src1 = ai->src1;