From 4ded663e68b0c1773492da21e1a156bf7f31c7c5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 19 Apr 2025 22:49:53 +0200 Subject: [PATCH] unit: Fix country code assignment for test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC unit/test-p2p.o unit/test-p2p.c:344:36: error: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (4 chars into 3 available) [-Werror=unterminated-string-initialization] 344 | .country = "XX\x04", | ^~~~~~~~ --- unit/test-p2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit/test-p2p.c b/unit/test-p2p.c index 08495e78..180c6d50 100644 --- a/unit/test-p2p.c +++ b/unit/test-p2p.c @@ -341,7 +341,7 @@ static const struct p2p_probe_req_data p2p_probe_req_data_1 = { .group_caps = 0, }, .listen_channel = { - .country = "XX\x04", + .country = { 'X', 'X', '\x04' }, .oper_class = 81, .channel_num = 1, },