[Skiboot] [PATCH 2/6] trace: Put variable sized type at end of struct

Joel Stanley joel at jms.id.au
Tue Jul 21 13:23:11 AEST 2015


This is a fixes the following error when building with clang:

core/trace.c:36:20: error: field 'trace_info' with variable sized type
      'struct trace_info' not at the end of a struct or class is a GNU extension
      [-Werror,-Wgnu-variable-sized-type-not-at-end]
        struct trace_info trace_info;

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 core/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/trace.c b/core/trace.c
index 15e505a..8ded1f3 100644
--- a/core/trace.c
+++ b/core/trace.c
@@ -33,8 +33,8 @@
 /* Smaller trace buffer for early booting */
 #define BOOT_TBUF_SZ 65536
 static struct {
-	struct trace_info trace_info;
 	char buf[BOOT_TBUF_SZ + MAX_SIZE];
+	struct trace_info trace_info;
 } boot_tracebuf;
 
 void init_boot_tracebuf(struct cpu_thread *boot_cpu)
-- 
2.1.4



More information about the Skiboot mailing list