Skip to contentSkip to conversation

disas/libvixl: Really suppress gcc 4.6.3 sign-compare warnings

PATCH In review Peter Maydell 2 participants 3 messages Jan 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disas/libvixl: Really suppress gcc 4.6.3 sign-compare warnings

Commit 8acc216b956 attempted to silence some sign-compare warnings in libvixl by adding -Wno-sign-compare to the CFLAGS for the relevant objects. Unfortunately it was ineffective because it was placed before $(QEMU_CFLAGS), so the -Wall in the general flags overrode -Wno-sign-compare rather than vice-versa. Reorder the flags so the warning suppression works.

Thanks to Franz-Josef Haider <[email protected]> for pointing out what was wrong with the original patch.

---
Alex, is there a way to test this patch against Travis before we commit it to master?

 disas/libvixl/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disas/libvixl/Makefile.objs +1 -1
index d1e801a..bbe7695 100644
@@ -6,6 +6,6 @@ libvixl_OBJS = vixl/utils.o \
 
 # The -Wno-sign-compare is needed only for gcc 4.6, which complains about
 # some signed-unsigned equality comparisons which later gcc versions do not.
-$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl -Wno-sign-compare $(QEMU_CFLAGS)
+$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS) -Wno-sign-compare
 
 common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)
Signature · 1 line
1.9.1
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Peter Maydell

Commit 8acc216b956 attempted to silence some sign-compare warnings in libvixl by adding -Wno-sign-compare to the CFLAGS for the relevant objects. Unfortunately it was ineffective because it was placed before $(QEMU_CFLAGS), so the -Wall in the general flags overrode -Wno-sign-compare rather than vice-versa. Reorder the flags so the warning suppression works.

Quoted 7 lines

Thanks to Franz-Josef Haider <[email protected]> for pointing out what was wrong with the original patch.

---
Alex, is there a way to test this patch against Travis before we commit it to master?

Mea culpa:

and a conditional:

when:

https://travis-ci.org/stsquad/qemu/builds/102371704

completes.

Quoted 9 lines
 disas/libvixl/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
disas/libvixl/Makefile.objs +0 -0
index d1e801a..bbe7695 100644

disas/libvixl/Makefile.objs libvixl_OBJS = vixl/utils.o \ · line 11

Quoted 7 lines
disas/libvixl/Makefile.objs +1 -1
@@ -6,6 +6,6 @@ libvixl_OBJS = vixl/utils.o \
 
 # The -Wno-sign-compare is needed only for gcc 4.6, which complains about
 # some signed-unsigned equality comparisons which later gcc versions do not.
-$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl -Wno-sign-compare $(QEMU_CFLAGS)
+$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS) -Wno-sign-compare
 
 common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)

--
Alex Bennée

#2 lore raw
Quoted 22 lines · Alex Bennée
Quoted 7 lines · Peter Maydell

Commit 8acc216b956 attempted to silence some sign-compare warnings in libvixl by adding -Wno-sign-compare to the CFLAGS for the relevant objects. Unfortunately it was ineffective because it was placed before $(QEMU_CFLAGS), so the -Wall in the general flags overrode -Wno-sign-compare rather than vice-versa. Reorder the flags so the warning suppression works.

Quoted 7 lines

Thanks to Franz-Josef Haider <[email protected]> for pointing out what was wrong with the original patch.

---
Alex, is there a way to test this patch against Travis before we commit it to master?

Mea culpa:

Quoted 7 lines

and a conditional:

when:

https://travis-ci.org/stsquad/qemu/builds/102371704

Test travis build completed OK, so I have pushed this fix to master.

thanks
-- PMM