Skip to content

Commit 9580f6d

Browse files
ankitkhushwahakuba-moo
authored andcommitted
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>
1 parent 50b3db3 commit 9580f6d

File tree

1 file changed

+1
-1
lines changed
  • tools/testing/selftests/net

1 file changed

+1
-1
lines changed

tools/testing/selftests/net/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,10 +2786,10 @@ TEST_F(tls_err, epoll_partial_rec)
27862786
TEST_F(tls_err, poll_partial_rec_async)
27872787
{
27882788
struct pollfd pfd = { };
2789+
char token = '\0';
27892790
ssize_t rec_len;
27902791
char rec[256];
27912792
char buf[128];
2792-
char token;
27932793
int p[2];
27942794
int ret;
27952795

0 commit comments

Comments
 (0)