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>
(cherry picked from commit a8628fb32e)
This commit is contained in:
Vinson Lee 2021-02-13 20:56:43 -08:00 committed by Eric Engestrom
parent f8cbd4d301
commit ce7f58e333
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
"description": "st/xa: Mark default xa_get_pipe_format case unreachable.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "9f2f5b3d7fd70663b98da5d302fcdfd5bc93db05"
},

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;