commit 4ded663e68b0c1773492da21e1a156bf7f31c7c5
parent c00bc3a065dff6fb9e94b1e3572d8974816113be
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Sat, 19 Apr 2025 22:49:53 +0200
unit: Fix country code assignment for test case
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",
| ^~~~~~~~
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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,
},