nir: Add a do to the do/while in nir_const_value_t_array()
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Wed, 9 Aug 2023 18:03:21 +0000 (13:03 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 12 Aug 2023 19:27:28 +0000 (19:27 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>

src/compiler/nir/nir.h

index 60f8df8..6a09216 100644 (file)
@@ -284,7 +284,7 @@ typedef union {
 } nir_const_value;
 
 #define nir_const_value_to_array(arr, c, components, m) \
-{ \
+do { \
    for (unsigned i = 0; i < components; ++i) \
       arr[i] = c[i].m; \
 } while (false)