From d7a94cae18110e724f3fa25b9cb2427081419916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Tue, 16 Mar 2021 21:20:32 +0100 Subject: [PATCH] anv: Use unreachable() in anv_genX. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gets rid of unused variable warnings on genX_thing, because now the compiler will think that the unknown hardware generation case is unreachable. Signed-off-by: Timur Kristóf Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 42dd24585c9..8b7f570777f 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4552,7 +4552,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_performance_configuration_intel, base, genX_thing = &gen125_##thing; \ break; \ default: \ - assert(!"Unknown hardware generation"); \ + unreachable("Unknown hardware generation"); \ } \ genX_thing; \ })