pahole: Initialize var to silence -Werror=maybe-uninitialized on gcc version 4.8.5 20150623
That str variable _will_ be initialized at that point, but lets set it
to NULL to silence gcc version 4.8.5 20150623.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/pahole.c b/pahole.c
index 829c9ab..594e4c8 100644
--- a/pahole.c
+++ b/pahole.c
@@ -685,7 +685,13 @@
cu__for_each_struct_or_union(cu, id, pos) {
bool looked = false;
- struct structure *str;
+ /*
+ * Set it to NULL just to silence the compiler, as the printf
+ * at the end of the type__for_each_member() loop is only reached
+ * after str _is_ set, as looked starts as false, str is used with
+ * structures_add and if it is NULL, we return.
+ */
+ struct structure *str = NULL;
if (pos->type.namespace.name == 0)
continue;