From fdcfdcd6f0bd74cb38797fa790907fa6787d507d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 1 Jun 2017 14:24:42 +0200 Subject: [PATCH] waf: Do not trhow a format-truncation error for test/snprintf.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=] BUG: https://bugzilla.samba.org/show_bug.cgi?id=12827 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison (cherry picked from commit 1670d00be88108a483f04c9763012504499b99e4) --- lib/replace/wscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index ea0d5d09b89..80e8257f9de 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -706,7 +706,8 @@ def build(bld): bld.SAMBA_SUBSYSTEM('replace-test', source='''test/testsuite.c test/strptime.c test/os2_delete.c test/getifaddrs.c''', - deps='replace') + deps='replace', + cflags="-Wno-format-zero-length -Wno-format-truncation") if bld.env.standalone_replace: bld.SAMBA_BINARY('replace_testsuite',