From 9e7379fc1c2258e0b1b8b7f381e9c8b193358550 Mon Sep 17 00:00:00 2001 From: Edward Pierzchalski <ed.pierzchalski@data61.csiro.au> Date: Thu, 14 Mar 2019 12:07:18 +1100 Subject: [PATCH] RISCV: avoid unsized arrays. The C parser will fail to process an array variable if it isn't eventually given a size. `trap_entry` is the symbol for an ASM function that we don't explicitly call from C anyway, so we only need the symbol to contain the relevant pointer value. --- src/arch/riscv/kernel/boot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arch/riscv/kernel/boot.c b/src/arch/riscv/kernel/boot.c index 5be50e007..f31c7c007 100644 --- a/src/arch/riscv/kernel/boot.c +++ b/src/arch/riscv/kernel/boot.c @@ -178,8 +178,10 @@ BOOT_CODE static void init_irqs(cap_t root_cnode_cap) write_slot(SLOT_PTR(pptr_of_cap(root_cnode_cap), seL4_CapIRQControl), cap_irq_control_cap_new()); } +/* ASM symbol for the CPU initialisation trap. */ +extern char trap_entry[1]; + /* This and only this function initialises the CPU. It does NOT initialise any kernel state. */ -extern char trap_entry[]; BOOT_CODE static void init_cpu(void) { -- GitLab