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

[Xen-devel] [PATCH ARM v7 13/13] mini-os: fixed compiling with debug=n



Without -fno-tree-loop-distribute-patterns, gcc -O3 recognises that our
"memset" is doing a memset operation and tries to make it call the
standard "memset", creating a loop.

The change to fdt_ro.c is to avoid a compiler warning.

Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>
---
 extras/mini-os/minios.mk   | 2 +-
 xen/common/libfdt/fdt_ro.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/extras/mini-os/minios.mk b/extras/mini-os/minios.mk
index 20ba64b..3e881e4 100644
--- a/extras/mini-os/minios.mk
+++ b/extras/mini-os/minios.mk
@@ -23,7 +23,7 @@ DEF_CFLAGS += -g
 #DEF_CFLAGS += -DGNT_DEBUG
 #DEF_CFLAGS += -DGNTMAP_DEBUG
 else
-DEF_CFLAGS += -O3
+DEF_CFLAGS += -O3 -fno-tree-loop-distribute-patterns
 endif
 
 # Make the headers define our internal stuff
diff --git a/xen/common/libfdt/fdt_ro.c b/xen/common/libfdt/fdt_ro.c
index 02b6d68..a34c6d6 100644
--- a/xen/common/libfdt/fdt_ro.c
+++ b/xen/common/libfdt/fdt_ro.c
@@ -444,7 +444,7 @@ int fdt_supernode_atdepth_offset(const void *fdt, int 
nodeoffset,
 
 int fdt_node_depth(const void *fdt, int nodeoffset)
 {
-       int nodedepth;
+       int nodedepth = -1;
        int err;
 
        err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
-- 
2.0.3


_______________________________________________
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®.