debian: Avoid -Wformat-zero-length warnings.
authorBen Pfaff <blp@nicira.com>
Tue, 22 Jul 2014 18:50:37 +0000 (11:50 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 22 Jul 2014 23:00:41 +0000 (16:00 -0700)
Debian puts an extra "-Wformat" in the CFLAGS following OVS's own
"-Wformat -Wno-format-zero-length", which therefore overrides
-Wno-format-zero-length, so this commit adds an extra
-Wno-format-zero-length to avoid those false positives.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
debian/rules

index 5cf9f02..081f24a 100755 (executable)
@@ -35,6 +35,13 @@ endif
 buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \
                      then dpkg-buildflags --export=configure; fi)
 
+# dpkg-buildflags tends to turn on -Wformat, which is admirable, but
+# the -Wformat-zero-length subset of that option triggers a couple of
+# false positives in Open vSwitch so turn it right back off again.
+# (We do this in configure.ac also, but the Debian buildflags override
+# those.)
+buildflags := $(patsubst -Wformat,-Wformat -Wno-format-zero-length,$(buildflags))
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir