Some of these are relatively harmless lazy coding issues; others are overzealousness on the part of the compiler (in some cases, the code is provably safe, yet GCC warns anyway). Turning the warnings off locally is not nice, but better than turning them off globally. Signed-off-by: Dave Martin <Dave.Martin@xxxxxxx> --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c4faff6..e8e9376 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ OBJS += builtin-stat.o OBJS += builtin-pause.o OBJS += builtin-resume.o OBJS += builtin-run.o +CFLAGS-builtin-run.o = -Wno-format-truncation -Wno-stringop-truncation OBJS += builtin-setup.o OBJS += builtin-stop.o OBJS += builtin-version.o @@ -63,9 +64,11 @@ OBJS += vfio/core.o OBJS += vfio/pci.o OBJS += virtio/blk.o OBJS += virtio/scsi.o +CFLAGS-virtio/scsi.o = -Wno-stringop-truncation OBJS += virtio/console.o OBJS += virtio/core.o OBJS += virtio/net.o +CFLAGS-virtio/net.o = -Wno-sizeof-pointer-memaccess -Wno-stringop-truncation OBJS += virtio/rng.o OBJS += virtio/balloon.o OBJS += virtio/pci.o @@ -82,6 +85,7 @@ OBJS += net/uip/udp.o OBJS += net/uip/buf.o OBJS += net/uip/csum.o OBJS += net/uip/dhcp.o +CFLAGS-net/uip/dhcp.o = -Wno-stringop-truncation OBJS += kvm-cmd.o OBJS += util/init.o OBJS += util/iovec.o @@ -93,6 +97,7 @@ OBJS += util/strbuf.o OBJS += util/read-write.o OBJS += util/util.o OBJS += virtio/9p.o +CFLAGS-virtio/9p.o = -Wno-restrict OBJS += virtio/9p-pdu.o OBJS += hw/vesa.o OBJS += hw/pci-shmem.o @@ -439,10 +444,10 @@ endif %.o: %.c ifeq ($(C),1) $(E) " CHECK " $@ - $(Q) $(CHECK) -c $(CFLAGS) $(CFLAGS_DYNOPT) $< -o $@ + $(Q) $(CHECK) -c $(CFLAGS-$@) $(CFLAGS) $(CFLAGS_DYNOPT) $< -o $@ endif $(E) " CC " $@ - $(Q) $(CC) -c $(c_flags) $(CFLAGS_DYNOPT) $< -o $@ + $(Q) $(CC) -c $(CFLAGS-$@) $(c_flags) $(CFLAGS_DYNOPT) $< -o $@ # -- 2.1.4 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm