]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence cppcheck portability warning
authorMark Andrews <marka@isc.org>
Tue, 1 May 2018 08:12:41 +0000 (18:12 +1000)
committerMichał Kępień <michal@isc.org>
Fri, 11 May 2018 06:12:17 +0000 (08:12 +0200)
CHANGES
lib/isc/tests/buffer_test.c

diff --git a/CHANGES b/CHANGES
index 4075e9b28a462017393b5ed360fbd147cc9a0d21..27869baad0c316c8f6d5ed93ee88822add6404c5 100644 (file)
--- 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'
index 9fead36a0ee7bb5ec1aa194a6acb4ace0a676fc1..70f49161c593a9cbf57686be5f135b74b5ccb862 100644 (file)
@@ -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);