[Pkg-xen-changes] [xen] 03/04: xen: common: Use unbounded array for symbols_offset.

Ian James Campbell ijc at moszumanska.debian.org
Fri Aug 21 15:05:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

ijc pushed a commit to branch feature/reportbug
in repository xen.

commit 11470f22cce35724fc26dcce9cb5ba4710365c9d
Author: Ian Campbell <ian.campbell at citrix.com>
Date:   Fri Mar 13 12:22:25 2015 +0000

    xen: common: Use unbounded array for symbols_offset.
    
    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 at citrix.com>
    Acked-by: Jan Beulich <jbeulich at suse.com>
---
 xen/common/symbols.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/symbols.c b/xen/common/symbols.c
index bc2fde6..fc7c9e7 100644
--- a/xen/common/symbols.c
+++ b/xen/common/symbols.c
@@ -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[];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xen/xen.git



More information about the Pkg-xen-changes mailing list