Commit ad4bf5f2 authored by Vincenzo Palazzo's avatar Vincenzo Palazzo Committed by Jakub Kicinski

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: default avatarVincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230310221851.304657-1-vincenzopalazzodev@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c5a8027d
...@@ -2292,9 +2292,9 @@ INDIRECT_CALLABLE_DECLARE(bool tcp_bpf_bypass_getsockopt(int level, ...@@ -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 __sys_getsockopt(int fd, int level, int optname, char __user *optval,
int __user *optlen) int __user *optlen)
{ {
int max_optlen __maybe_unused;
int err, fput_needed; int err, fput_needed;
struct socket *sock; struct socket *sock;
int max_optlen;
sock = sockfd_lookup_light(fd, &err, &fput_needed); sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock) if (!sock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment