diff options
author | Vincenzo Palazzo <vincenzopalazzodev@gmail.com> | 2023-03-10 23:18:51 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-03-13 15:59:20 -0700 |
commit | ad4bf5f2406f6a2e29266bbad74e18f0d955ac4c (patch) | |
tree | 8fdf002180a58759373d66469f10aad8dba55516 | |
parent | c5a8027de26e1b7c0ba4f8e430165b6a4a29a869 (diff) | |
download | linux-stable-ad4bf5f2406f6a2e29266bbad74e18f0d955ac4c.tar.gz linux-stable-ad4bf5f2406f6a2e29266bbad74e18f0d955ac4c.tar.bz2 linux-stable-ad4bf5f2406f6a2e29266bbad74e18f0d955ac4c.zip |
net: socket: suppress unused warning
suppress unused warnings and fix the error that there is
with the W=1 enabled.
Warning generated
net/socket.c: In function ‘__sys_getsockopt’:
net/socket.c:2300:13: error: variable ‘max_optlen’ set but not used [-Werror=unused-but-set-variable]
2300 | int max_optlen;
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230310221851.304657-1-vincenzopalazzodev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index 9c92c0e6c4da..73e493da4589 100644 --- a/net/socket.c +++ b/net/socket.c @@ -2292,9 +2292,9 @@ INDIRECT_CALLABLE_DECLARE(bool tcp_bpf_bypass_getsockopt(int level, int __sys_getsockopt(int fd, int level, int optname, char __user *optval, int __user *optlen) { + int max_optlen __maybe_unused; int err, fput_needed; struct socket *sock; - int max_optlen; sock = sockfd_lookup_light(fd, &err, &fput_needed); if (!sock) |