st/xa: Mark default xa_get_pipe_format case unreachable.

Fix defect reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value fdesc. Field fdesc.format is uninitialized.

Fixes: 9f2f5b3d7f ("st/xa: Initial import of the xa state-tracker and the xa-vmwgfx target.")
Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9035>
This commit is contained in:
Vinson Lee 2021-02-13 20:56:43 -08:00 committed by Marge Bot
parent 6d9ca1d4e4
commit a8628fb32e

View file

@ -155,7 +155,7 @@ xa_get_pipe_format(struct xa_tracker *xa, enum xa_formats xa_format)
fdesc.format = PIPE_FORMAT_L8_UNORM;
break;
default:
fdesc.xa_format = xa_format_unknown;
unreachable("Unexpected format");
break;
}
return fdesc;