Skip to content

microsoft/clc: Add unreachable() to fix 'may be unitialized' warning

Caio Oliveira requested to merge cmarcelo/mesa:microsoft-clc-warning into main
  In function ‘lower_load_kernel_input’,
      inlined from ‘clc_nir_lower_kernel_input_loads’ at ../src/microsoft/clc/clc_nir.c:205:28:
  ../src/microsoft/clc/clc_nir.c:169:7: warning: ‘base_type’ may be used uninitialized [-Wmaybe-uninitialized]
    169 |       glsl_vector_type(base_type, nir_dest_num_components(intr->dest));
        |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../src/microsoft/clc/clc_nir.c: In function ‘clc_nir_lower_kernel_input_loads’:
  ../src/microsoft/clc/clc_nir.c:151:24: note: ‘base_type’ was declared here
    151 |    enum glsl_base_type base_type;
        |                        ^~~~~~~~~
Edited by Caio Oliveira

Merge request reports