The FCrypt keys and IVs and the DES test plaintext are binary data. Their arrays intentionally use every byte. Enabling GCC's -Wunterminated-string-initialization flags the string literal initializers because there is no room for a terminating NUL. Mark the arrays as __nonstring to describe the contents while keeping the bytes consumed by both tests unchanged. OpenAI Codex assisted with the patch, commit message, and local tests using the public KSPP compiler diagnostics. Link: https://github.com/KSPP/linux/issues/384 Signed-off-by: Anggara Putra <angg…@gmail.com> --- Both RxRPC KUnit tests passed on x86-64. net/rxrpc/tests/rxrpc_kunit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/tests/rxrpc_kunit.c b/net/rxrpc/tests/rxrpc_kunit.c index 95fd05a..dcd93e6 100644 --- a/net/rxrpc/tests/rxrpc_kunit.c +++ b/net/rxrpc/tests/rxrpc_kunit.c @@ -9,8 +9,8 @@ #include <kunit/test.h> struct fcrypt_pcbc_testvec { - u8 key[FCRYPT_BSIZE]; - u8 iv[FCRYPT_BSIZE]; + u8 key[FCRYPT_BSIZE] __nonstring; + u8 iv[FCRYPT_BSIZE] __nonstring; const u8 *ptext; /* plaintext */ const u8 *ctext; /* ciphertext */ size_t nblocks; /* length of ptext and ctext in blocks */ @@ -97,7 +97,7 @@ static void test_fcrypt_pcbc(struct kunit *test) static void test_des_pcbc(struct kunit *test) { /* This was generated from the original pcbc(des) crypto API code. */ - static const u8 expected_ptext[24] = + static const u8 expected_ptext[24] __nonstring = "\xc8\xe2\x3c\xdf\x80\x61\x8a\xad\xa5\x52\xb4\x20" "\x74\x32\x1f\xe4\x2c\x15\x7d\x21\x57\xda\x3f\x31"; u8 key[8];