]> xenbits.xensource.com Git - xen.git/commitdiff
xen: common: Use unbounded array for symbols_offset.
authorIan Campbell <ian.campbell@citrix.com>
Thu, 29 Oct 2015 13:10:31 +0000 (14:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 13:10:31 +0000 (14:10 +0100)
Using a singleton array causes gcc5 to report:
symbols.c: In function 'symbols_lookup':
symbols.c:128:359: error: array subscript is above array bounds [-Werror=array-bounds]
symbols.c:136:176: error: array subscript is above array bounds [-Werror=array-bounds]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: 3f82ea62826d4eb06002d8dba475bafcc454b845
master date: 2015-03-20 12:02:03 +0000

xen/common/symbols.c

index 83b2b58b59a44d8648d9f9ea9ad2ae8894d2cbd3..e576a1b30ab7d8f815dfc2e4412419f1ea734bee 100644 (file)
@@ -19,7 +19,7 @@
 #include <xen/spinlock.h>
 
 #ifdef SYMBOLS_ORIGIN
-extern const unsigned int symbols_offsets[1];
+extern const unsigned int symbols_offsets[];
 #define symbols_address(n) (SYMBOLS_ORIGIN + symbols_offsets[n])
 #else
 extern const unsigned long symbols_addresses[];