mirror of https://github.com/torvalds/linux.git
selftest: af_unix: Silence -Wall warning for scm_pid.c.
-Wall found 2 unused variables in scm_pid.c:
scm_pidfd.c: In function ‘parse_cmsg’:
scm_pidfd.c:140:13: warning: unused variable ‘data’ [-Wunused-variable]
140 | int data = 0;
| ^~~~
scm_pidfd.c: In function ‘cmsg_check_dead’:
scm_pidfd.c:246:15: warning: unused variable ‘client_pid’ [-Wunused-variable]
246 | pid_t client_pid;
| ^~~~~~~~~~
Let's remove these variables.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250811215432.3379570-5-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
9a58d8e682
commit
fd9faac372
|
|
@ -137,7 +137,6 @@ struct cmsg_data {
|
|||
static int parse_cmsg(struct msghdr *msg, struct cmsg_data *res)
|
||||
{
|
||||
struct cmsghdr *cmsg;
|
||||
int data = 0;
|
||||
|
||||
if (msg->msg_flags & (MSG_TRUNC | MSG_CTRUNC)) {
|
||||
log_err("recvmsg: truncated");
|
||||
|
|
@ -243,7 +242,6 @@ static int cmsg_check_dead(int fd, int expected_pid)
|
|||
int data = 0;
|
||||
char control[CMSG_SPACE(sizeof(struct ucred)) +
|
||||
CMSG_SPACE(sizeof(int))] = { 0 };
|
||||
pid_t client_pid;
|
||||
struct pidfd_info info = {
|
||||
.mask = PIDFD_INFO_EXIT,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue