waf: Do not trhow a format-truncation error for test/snprintf.c
authorAndreas Schneider <asn@samba.org>
Thu, 1 Jun 2017 12:24:42 +0000 (14:24 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 1 Jun 2017 17:35:10 +0000 (19:35 +0200)
This fixes building with GCC 7.1

Error:
../lib/replace/test/testsuite.c:355:6: error: ā€˜%dā€™ directive output
truncated writing 1 byte into a region of size 0
[-Werror=format-truncation=]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/replace/wscript

index 38627c0e30919b373397677b847525d7eb252e25..eeb1b3ebcf02d10e47c2ff53b22b70aeceb9dd4a 100644 (file)
@@ -708,7 +708,7 @@ def build(bld):
                         source='''test/testsuite.c test/strptime.c
                         test/os2_delete.c test/getifaddrs.c''',
                         deps='replace',
-                        cflags="-Wno-format-zero-length")
+                        cflags="-Wno-format-zero-length -Wno-format-truncation")
 
     if bld.env.standalone_replace:
         bld.SAMBA_BINARY('replace_testsuite',