From 2ff9249810a3afe45bcdec571f093dc45fb84eca Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:27:22 +0000 Subject: [PATCH 1/8] -Wformat-security not needed with -Wformat=2 --- doc/educational_decoder/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/educational_decoder/Makefile b/doc/educational_decoder/Makefile index ace1294f8..c1d2c4cc4 100644 --- a/doc/educational_decoder/Makefile +++ b/doc/educational_decoder/Makefile @@ -7,7 +7,7 @@ CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls CFLAGS += $(DEBUGFLAGS) From 2b7120ec719ed825723681bea69ac245bf9936f4 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:28:41 +0000 Subject: [PATCH 2/8] -Wformat-security not needed with -Wformat=2 --- contrib/largeNbDicts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/largeNbDicts/Makefile b/contrib/largeNbDicts/Makefile index 541f3969b..6fc382563 100644 --- a/contrib/largeNbDicts/Makefile +++ b/contrib/largeNbDicts/Makefile @@ -18,7 +18,7 @@ CFLAGS ?= -O3 CFLAGS += -std=gnu99 DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum \ - -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) From 4a9e0502e632560367a77ba61e9e12fa1d553196 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:29:08 +0000 Subject: [PATCH 3/8] -Wformat-security not needed with -Wformat=2 --- contrib/adaptive-compression/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/adaptive-compression/Makefile b/contrib/adaptive-compression/Makefile index c26efcd28..2c6867f5c 100644 --- a/contrib/adaptive-compression/Makefile +++ b/contrib/adaptive-compression/Makefile @@ -13,7 +13,7 @@ CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls CFLAGS += $(DEBUGFLAGS) From 723418f8d853c0a2beeeec928e2040b104de2a2f Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:29:40 +0000 Subject: [PATCH 4/8] -Wformat-security not needed with -Wformat=2 --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 2daf0970f..2a9cd3d8f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -33,7 +33,7 @@ endif CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls -Wmissing-prototypes CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) From 188c7482080aa8d463dca633cabfaf1cebea6d27 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:30:31 +0000 Subject: [PATCH 5/8] -Wformat-security not needed with -Wformat=2 --- build/meson/lib/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/meson/lib/meson.build b/build/meson/lib/meson.build index a02bd2d7a..f8014c625 100644 --- a/build/meson/lib/meson.build +++ b/build/meson/lib/meson.build @@ -98,7 +98,7 @@ if use_debug if cc_id == compiler_gcc or cc_id == compiler_clang libzstd_debug_cflags = ['-Wstrict-aliasing=1', '-Wswitch-enum', '-Wdeclaration-after-statement', '-Wstrict-prototypes', - '-Wundef', '-Wpointer-arith', '-Wformat-security', '-Wvla', + '-Wundef', '-Wpointer-arith', '-Wvla', '-Wformat=2', '-Winit-self', '-Wfloat-equal', '-Wwrite-strings', '-Wredundant-decls', '-Wmissing-prototypes', '-Wc++-compat'] endif From 894bbda44c9a02a67f2a8e6fcae8e039701d685a Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:31:02 +0000 Subject: [PATCH 6/8] -Wformat-security not needed with -Wformat=2 --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 386583e72..6a912a657 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,7 +25,7 @@ endif CFLAGS ?= -O3 DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls -Wmissing-prototypes -Wc++-compat CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) From 1951c1b3a0579e16a91a4888ba864a5e2e768675 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:31:46 +0000 Subject: [PATCH 7/8] -Wformat-security not needed with -Wformat=2 --- programs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/Makefile b/programs/Makefile index d1910fbb4..692980e4f 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -51,7 +51,7 @@ endif CFLAGS ?= -O3 DEBUGFLAGS+=-Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls -Wmissing-prototypes -Wc++-compat CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) From cdb3e7af2fcb3120476b643dafa7da6179097874 Mon Sep 17 00:00:00 2001 From: "Peter (Stig) Edwards" Date: Fri, 1 Feb 2019 09:38:49 +0000 Subject: [PATCH 8/8] -Wformat-security not needed with -Wformat=2 --- tests/fuzz/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzz/Makefile b/tests/fuzz/Makefile index 4130f18e3..8a22ad1c5 100644 --- a/tests/fuzz/Makefile +++ b/tests/fuzz/Makefile @@ -30,7 +30,7 @@ FUZZ_CPPFLAGS := -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ $(CPPFLAGS) FUZZ_EXTRA_FLAGS := -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ - -Wstrict-prototypes -Wundef -Wformat-security \ + -Wstrict-prototypes -Wundef \ -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ -Wredundant-decls \ -g -fno-omit-frame-pointer