From: Mark Andrews Date: Tue, 1 May 2018 08:12:41 +0000 (+1000) Subject: silence cppcheck portability warning X-Git-Tag: v9.13.0~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aae115d1542c74bb4629bcacaf2ed24d12e3382;p=thirdparty%2Fbind9.git silence cppcheck portability warning --- diff --git a/CHANGES b/CHANGES index 4075e9b28a4..27869baad0c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4944. [cleanup] Silence cppcheck portability warnings in + lib/isc/tests/buffer_test.c. [GL #239] + 4943. [bug] Change 4687 consumed too much memory when running system tests with --with-tuning=large. Reduced the hash table size to 512 entries for 'named -m record' diff --git a/lib/isc/tests/buffer_test.c b/lib/isc/tests/buffer_test.c index 9fead36a0ee..70f49161c59 100644 --- a/lib/isc/tests/buffer_test.c +++ b/lib/isc/tests/buffer_test.c @@ -265,10 +265,15 @@ ATF_TC_BODY(isc_buffer_printf, tc) { /* * Check an empty format string is properly handled. + * + * Note: we don't use a string literal for the format string to + * avoid triggering [-Werror=format-zero-length]. + * Note: we have a dummy third argument as some compilers complain + * without it. */ prev_used = used; empty_fmt = ""; - result = isc_buffer_printf(b, empty_fmt, NULL); + result = isc_buffer_printf(b, empty_fmt, ""); ATF_CHECK_EQ(result, ISC_R_SUCCESS); used = isc_buffer_usedlength(b); ATF_CHECK_EQ(prev_used, used);