[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251205163242.14615-1-ankitkhushwaha.linux@gmail.com>
Date: Fri, 5 Dec 2025 22:02:42 +0530
From: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Sabrina Dubroca <sd@...asysnail.net>
Cc: Shuah Khan <shuah@...nel.org>,
netdev@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
Subject: [PATCH net-next v2] 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@...il.com>
---
compiler used: clang version 21.1.5 (Fedora 21.1.5-1.fc43).
changelog:
v2:
- update patch name and msg
v1: https://lore.kernel.org/all/20251129063726.31210-1-ankitkhushwaha.linux@gmail.com/
---
tools/testing/selftests/net/tls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index a3ef4b57eb5f..a4d16a460fbe 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -2786,10 +2786,10 @@ TEST_F(tls_err, epoll_partial_rec)
TEST_F(tls_err, poll_partial_rec_async)
{
struct pollfd pfd = { };
+ char token = '\0';
ssize_t rec_len;
char rec[256];
char buf[128];
- char token;
int p[2];
int ret;
--
2.52.0
Powered by blists - more mailing lists