[Mesa-dev] [PATCH 1/8] nir: Silence missing field initializer warnings for nir_src
Ian Romanick
idr at freedesktop.org
Mon Dec 14 15:34:25 PST 2015
From: Ian Romanick <ian.d.romanick at intel.com>
nir/nir.h: In function 'nir_src_for_ssa':
nir/nir.h:552:4: warning: missing initializer for field 'use_link' of 'nir_src'
[-Wmissing-field-initializers]
nir_src src = NIR_SRC_INIT;
^
In file included from nir/nir.c:28:0:
nir/nir.h:508:21: note: 'use_link' declared here
struct list_head use_link;
^
Number of total warnings in my build reduced from 2329 to 1932
(reduction of 397).
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/nir/nir.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 2e72e66..5543c52 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -515,7 +515,7 @@ typedef struct nir_src {
bool is_ssa;
} nir_src;
-#define NIR_SRC_INIT (nir_src) { { NULL } }
+#define NIR_SRC_INIT (nir_src) { { NULL }, { NULL, NULL }, { { NULL, NULL, 0 } }, false }
#define nir_foreach_use(reg_or_ssa_def, src) \
list_for_each_entry(nir_src, src, &(reg_or_ssa_def)->uses, use_link)
--
2.5.0
More information about the mesa-dev
mailing list