From: Douglas Bagnall Date: Tue, 1 Nov 2016 00:26:11 +0000 (+1300) Subject: lib/replace tests: prevent GCC fretting over snprintf sizes X-Git-Tag: talloc-2.1.9~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b02d636e0b1c43821a83297f51599bb03b5858b3;p=thirdparty%2Fsamba.git lib/replace tests: prevent GCC fretting over snprintf sizes These tests deliberately use snprintf for truncating strings, which is fine for tests. This has the effect of leaving the warning in place but preventing it from becoming a fatal error. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/replace/wscript b/lib/replace/wscript index ea0d5d09b89..de199b1790b 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -704,9 +704,10 @@ def build(bld): deps='crypt dl nsl socket rt attr' + extra_libs) bld.SAMBA_SUBSYSTEM('replace-test', - source='''test/testsuite.c test/strptime.c - test/os2_delete.c test/getifaddrs.c''', - deps='replace') + source='''test/testsuite.c test/strptime.c + test/os2_delete.c test/getifaddrs.c''', + deps='replace', + cflags="-Wno-format-length") if bld.env.standalone_replace: bld.SAMBA_BINARY('replace_testsuite',