diff --git a/Config.mk b/Config.mk index c184add653..98ca1e2847 100644 --- a/Config.mk +++ b/Config.mk @@ -177,8 +177,6 @@ CFLAGS += -std=gnu99 CFLAGS += -Wall -Wstrict-prototypes -$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) -$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) $(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs) diff --git a/stubdom/Makefile b/stubdom/Makefile index 71c9b2200e..8c503c2bf8 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -245,7 +245,7 @@ tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz patch -d $@ -p1 < vtpm-command-duration.patch patch -d $@ -p1 < vtpm-tpm_bn_t-addr.patch mkdir $@/build - cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement" + cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" touch $@ TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a diff --git a/stubdom/vtpmmgr/Makefile b/stubdom/vtpmmgr/Makefile index 6dae034a07..c29bb49838 100644 --- a/stubdom/vtpmmgr/Makefile +++ b/stubdom/vtpmmgr/Makefile @@ -17,7 +17,7 @@ OBJS += vtpm_disk.o disk_tpm.o disk_io.o disk_crypto.o disk_read.o disk_write.o OBJS += mgmt_authority.o CFLAGS+=-Werror -Iutil -Icrypto -Itcs -CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label +CFLAGS+=-Wno-unused-label build: $(TARGET) $(TARGET): $(OBJS) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index ba4c1b7933..37e4d16709 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -38,8 +38,7 @@ vpath static_tables.c $(ACPI_PATH)/ OBJS-$(CONFIG_X86) += $(ACPI_OBJS) -CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ - -Wno-declaration-after-statement -Wformat-nonliteral +CFLAGS += -Wno-format-zero-length -Wmissing-declarations -Wformat-nonliteral CFLAGS-$(CONFIG_X86) += -DCONFIG_PCI_SUPP_LEGACY_IRQ diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index c3b21875dc..936ec90a31 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -9,8 +9,7 @@ OBJS-y += libxlu_disk.o OBJS-y += libxlu_vif.o OBJS-y += libxlu_pci.o -CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ - -Wno-declaration-after-statement -Wformat-nonliteral +CFLAGS += -Wno-format-zero-length -Wmissing-declarations -Wformat-nonliteral CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(PTHREAD_CFLAGS) diff --git a/tools/tests/depriv/Makefile b/tools/tests/depriv/Makefile index 7d9e3b01bb..5404a12f47 100644 --- a/tools/tests/depriv/Makefile +++ b/tools/tests/depriv/Makefile @@ -1,8 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Wno-declaration-after-statement - CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxencall) diff --git a/tools/xl/Makefile b/tools/xl/Makefile index 5f7aa5f46c..d742e96a5b 100644 --- a/tools/xl/Makefile +++ b/tools/xl/Makefile @@ -5,8 +5,7 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ - -Wno-declaration-after-statement -Wformat-nonliteral +CFLAGS += -Wno-format-zero-length -Wmissing-declarations -Wformat-nonliteral CFLAGS += -fPIC CFLAGS += $(PTHREAD_CFLAGS) diff --git a/xen/Makefile b/xen/Makefile index ca571103c8..360fb6dcae 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -393,6 +393,7 @@ CFLAGS-$(CONFIG_CC_SPLIT_SECTIONS) += -ffunction-sections -fdata-sections CFLAGS += -nostdinc -fno-builtin -fno-common CFLAGS += -Werror -Wredundant-decls -Wwrite-strings -Wno-pointer-arith +$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wvla) CFLAGS += -pipe -D__XEN__ -include $(srctree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) += -g