Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: tls: fix warning of uninitialized variable

In 'poll_partial_rec_async' a uninitialized char variable 'token' with
is used for write/read instruction to synchronize between threads
via a pipe.

tls.c:2833:26: warning: variable 'token' is uninitialized
when passed as a const pointer argument

Initialize 'token' to '\0' to silence compiler warning.

Signed-off-by: Ankit Khushwaha <ankitkhushwaha.linux@gmail.com>
Link: https://patch.msgid.link/20251205163242.14615-1-ankitkhushwaha.linux@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ankit Khushwaha and committed by
Jakub Kicinski
9580f6d4 50b3db3e

+1 -1
+1 -1
tools/testing/selftests/net/tls.c
··· 2786 2786 TEST_F(tls_err, poll_partial_rec_async) 2787 2787 { 2788 2788 struct pollfd pfd = { }; 2789 + char token = '\0'; 2789 2790 ssize_t rec_len; 2790 2791 char rec[256]; 2791 2792 char buf[128]; 2792 - char token; 2793 2793 int p[2]; 2794 2794 int ret; 2795 2795