From 923938edde18f6aeaf3dd705cf8ed73e4ad67a6a Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 2 Jun 2016 17:56:00 +0200 Subject: [PATCH] Added `-Wdeclaration-after-statement` compilation flag --- lib/Makefile | 2 +- programs/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 75b09e5d..76731abc 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -48,7 +48,7 @@ INCLUDEDIR=$(PREFIX)/include CPPFLAGS= -I./common -DXXH_NAMESPACE=ZSTD_ CFLAGS ?= -O3 -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS) diff --git a/programs/Makefile b/programs/Makefile index 1e8a7f26..52a7ca07 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -40,7 +40,7 @@ ZSTDDIR = ../lib CPPFLAGS= -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder -DXXH_NAMESPACE=ZSTD_ CFLAGS ?= -O3 # -falign-loops=32 # not always beneficial -CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS)