r300: workaround GCC 12+ warning, declare NULL value as unreachable

Solution recommended in the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109716#c3

Suggested-by: Eric Engestrom <eric@engestrom.ch>

Acked-by: Filip Gawin <filip@gawin.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23148>
This commit is contained in:
David Heidelberg 2023-05-05 21:55:55 +02:00
parent e401add741
commit cc0cf1762d

View file

@ -648,11 +648,11 @@ static uint32_t r300_get_border_color(enum pipe_format format,
const float border[4],
boolean is_r500)
{
const struct util_format_description *desc;
const struct util_format_description *desc = util_format_description(format);
float border_swizzled[4] = {0};
union util_color uc = {0};
desc = util_format_description(format);
assume(desc);
/* Do depth formats first. */
if (util_format_is_depth_or_stencil(format)) {