diff options
| author | Ankit Khushwaha <ankitkhushwaha.linux@gmail.com> | 2025-12-05 22:02:42 +0530 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-12-10 01:03:02 -0800 |
| commit | 9580f6d47dd6156c6d16e988d28faa74e5a0b8ba (patch) | |
| tree | 38a047a627a2275c2e5bbbc5526557d2cd0f0851 | |
| parent | 50b3db3e11864cb4e18ff099cfb38e11e7f87a68 (diff) | |
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>
| -rw-r--r-- | tools/testing/selftests/net/tls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index da1b50b30719..a625d0be62d0 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; |
