From: Andrew Cooper Date: Tue, 31 May 2022 16:37:10 +0000 (+0100) Subject: build: Fix build with GCC 4.8.5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=37ea4e513a2ce0cd22f9c9a32b18d5c022e38e12;p=xtf.git build: Fix build with GCC 4.8.5 GCC 4.8.5 complains: xtf/arch/x86/pv/traps.c: In function 'init_callbacks': xtf/arch/x86/pv/traps.c:126:13: error: initializer element is not constant .address = INIT_XEN_CALLBACK(__KERN_CS, _u(entry_EVTCHN)), ^ xtf/arch/x86/pv/traps.c:126:13: error: (near initialization for 'cb[0].address') Drop the static const. Reported-by: Samuel Verschelde Signed-off-by: Andrew Cooper --- diff --git a/arch/x86/pv/traps.c b/arch/x86/pv/traps.c index ae506d1..e78f97e 100644 --- a/arch/x86/pv/traps.c +++ b/arch/x86/pv/traps.c @@ -120,7 +120,7 @@ static void init_callbacks(void) if ( rc ) panic("Failed to set trap table: %d\n", rc); - static const xen_callback_register_t cb[] = { + xen_callback_register_t cb[] = { { .type = CALLBACKTYPE_event, .address = INIT_XEN_CALLBACK(__KERN_CS, _u(entry_EVTCHN)),