]> git.saurik.com Git - apt.git/blobdiff - buildlib/environment.mak.in
fix memory leaks reported by -fsanitize
[apt.git] / buildlib / environment.mak.in
index b0a8d9d357c8b3b1d1ae89274b5bbc65641cce7a..8ea7a05ba16d560668d94933d07ca25eed24f07b 100644 (file)
@@ -11,7 +11,13 @@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2
 CXX = @CXX@
 CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
 CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
-CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
+# suggests methods which already have such an attribute
+#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+# gcc reports currently lots of them at the end of file - unknown reason
+CXXFLAGS+= -Wno-deprecated-declarations
+# sanitize options to be enabled for testing
+#CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
 # a bit too pedantic to be run by default
 #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros
 NUM_PROCS = @NUM_PROCS@