From aa97c234843044536b2ff58904213de2363e624f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Mon, 10 Nov 2025 11:51:58 -0800 Subject: [PATCH] brw: shut -Wmaybe-uninitialized up Release builds are noisy about flush_type and scope being used uninitialized, even though they are always set. Initialize them to the final else values to make GCC happy. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw/brw_from_nir.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/intel/compiler/brw/brw_from_nir.cpp b/src/intel/compiler/brw/brw_from_nir.cpp index 69b4b70ebc7..6908a68c4d1 100644 --- a/src/intel/compiler/brw/brw_from_nir.cpp +++ b/src/intel/compiler/brw/brw_from_nir.cpp @@ -5077,8 +5077,8 @@ lsc_fence_descriptor_for_intrinsic(const struct intel_device_info *devinfo, { assert(devinfo->has_lsc); - enum lsc_fence_scope scope; - enum lsc_flush_type flush_type; + enum lsc_fence_scope scope = LSC_FENCE_TILE; + enum lsc_flush_type flush_type = LSC_FLUSH_TYPE_EVICT; if (instr->intrinsic == nir_intrinsic_begin_invocation_interlock || instr->intrinsic == nir_intrinsic_end_invocation_interlock) { @@ -5110,10 +5110,6 @@ lsc_fence_descriptor_for_intrinsic(const struct intel_device_info *devinfo, flush_type = LSC_FLUSH_TYPE_NONE; break; } - } else { - /* No scope defined. */ - scope = LSC_FENCE_TILE; - flush_type = LSC_FLUSH_TYPE_EVICT; } } return lsc_fence_msg_desc(devinfo, scope, flush_type, true);