From dbfb925c8198087afb3527e6c57b66fae1a980bb Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 3 May 2025 12:37:28 +0300 Subject: [PATCH] Tests: Silence a warning from GCC 15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It was (probably) intentionally without the null terminator, but the test works with null terminator too (the test still fails with xz <= 5.0.3), so simply omit one character to silence the warning. tests/test_bcj_exact_size.c:30:32: error: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Werror=unterminated-string-initialization] 30 | const uint8_t in[16] = "0123456789ABCDEF"; | ^~~~~~~~~~~~~~~~~~ Fixes: d8db706acb83 ("liblzma: Fix possibility of incorrect LZMA_BUF_ERROR.") Fixes: https://github.com/tukaani-project/xz/issues/176 --- tests/test_bcj_exact_size.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_bcj_exact_size.c b/tests/test_bcj_exact_size.c index fa82f0d7..c73560ca 100644 --- a/tests/test_bcj_exact_size.c +++ b/tests/test_bcj_exact_size.c @@ -27,7 +27,7 @@ test_exact_size(void) "is disabled"); // Something to be compressed - const uint8_t in[16] = "0123456789ABCDEF"; + const uint8_t in[16] = "0123456789ABCDE"; // in[] after compression uint8_t compressed[1024]; -- 2.47.2