[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 01/34] xen: clang: Disable initializer-overrides warning



The commit 819c084 "x86/MTRR: optionally print boot time state" introduces use
of the pattern of initializing an array with a range-based default entry.
On clang it results as a compilation failure:
generic.c:95:32: error: initializer overrides prior initialization of this 
subobject [-Werror,-Winitializer-overrides]
                [MTRR_TYPE_UNCACHABLE]     = "uncachable",
                                             ^~~~~~~~~~~~
generic.c:94:32: note: previous initialization is here
                [0 ... MTRR_NUM_TYPES - 1] = "?",
                                             ^~~
Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Rules.mk |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 42c713f..18fbd62 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -68,6 +68,8 @@ ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
+CFLAGS-$(clang)         += -Wno-initializer-overrides
+
 AFLAGS-y                += -D__ASSEMBLY__ -include 
$(BASEDIR)/include/xen/config.h
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.