freedreno: Suppress uninit var warnings from shader stage switch.

It seems we have enough branches that the compiler gets confused now, and
I can also suppress the warning by replacing "unreachable()" with
"return".  Unreachable is good for debugging, so just 0-init the values.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7664>
This commit is contained in:
Eric Anholt 2020-11-17 13:43:28 -08:00 committed by Marge Bot
parent 8ae38885d6
commit b537d425b3
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ fd6_emit_shader(struct fd_ringbuffer *ring, const struct ir3_shader_variant *so)
{
enum a6xx_state_block sb = fd6_stage2shadersb(so->type);
uint32_t obj_start;
uint32_t instrlen;
uint32_t obj_start = 0;
uint32_t instrlen = 0;
switch (so->type) {
case MESA_SHADER_VERTEX: