build: specify -Wformat as a prerequisite of -Wformat-security
[metze/samba/wip.git] / buildtools / wafsamba / samba_autoconf.py
index 682edf4215fc2939a119223d06aea4f0b3c32e01..e157b20de2ce78b3eff09450be7a23930c9f207b 100644 (file)
@@ -709,7 +709,8 @@ def SAMBA_CONFIG_H(conf, path=None):
 
         conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
         conf.ADD_CFLAGS('-Wno-format-zero-length', testflags=True)
-        conf.ADD_CFLAGS('-Werror=format-security -Wformat-security', testflags=True)
+        conf.ADD_CFLAGS('-Werror=format-security -Wformat-security',
+                        testflags=True, prereq_flags='-Wformat')
         # This check is because for ldb_search(), a NULL format string
         # is not an error, but some compilers complain about that.
         if CHECK_CFLAGS(conf, ["-Werror=format", "-Wformat=2"], '''