From 0912f38bd7a087c336cb2eba43530100d767e1f9 Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Fri, 17 Jul 2026 17:56:44 +0200 Subject: [PATCH] test(buffers): zero-initialize the array in buffer_slice testConstInput MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uninitialized array is passed by pointer to const_buffer, which trips -Werror=maybe-uninitialized in the coverage build. The bytes are never read — the test only checks concept modeling — so zero-init is inert. --- test/unit/buffers/buffer_slice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/buffers/buffer_slice.cpp b/test/unit/buffers/buffer_slice.cpp index ed5286cce..42a83fa38 100644 --- a/test/unit/buffers/buffer_slice.cpp +++ b/test/unit/buffers/buffer_slice.cpp @@ -62,7 +62,7 @@ struct buffer_slice_test void testConstInput() { - char a[10]; + char a[10] = {}; std::array cb = { const_buffer(a, sizeof(a)) }; auto s = buffer_slice(cb); static_assert(ConstBufferSequence,