]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
build: Fix build with GCC 4.8.5
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 31 May 2022 16:37:10 +0000 (17:37 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 31 May 2022 17:13:21 +0000 (18:13 +0100)
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 <stormi-xcp@ylix.fr>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/pv/traps.c

index ae506d1c6c68f75e3315622f78b32751f21bccbf..e78f97e6f933861a7c4f5d0cda77dc88ec26fbec 100644 (file)
@@ -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)),