git: 74a0e24f0797 - main - linux: plug set-but-not-unused vars
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Nov 2021 21:16:32 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=74a0e24f07974b4d51c57afa7525b5f88574ad31 commit 74a0e24f07974b4d51c57afa7525b5f88574ad31 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-11-24 21:16:03 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-11-24 21:16:03 +0000 linux: plug set-but-not-unused vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/compat/linux/linux_emul.c | 9 +++++---- sys/compat/linux/linux_event.c | 2 -- sys/compat/linux/linux_misc.c | 2 -- sys/compat/linux/linux_mmap.c | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 86688d50c8a8..83c82fc84fee 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -363,12 +363,13 @@ void linux_schedtail(struct thread *td) { struct linux_emuldata *em; - struct proc *p; - int error = 0; +#ifdef KTR + int error; +#else + int error __unused; +#endif int *child_set_tid; - p = td->td_proc; - em = em_find(td); KASSERT(em != NULL, ("linux_schedtail: thread emuldata not found.\n")); child_set_tid = em->child_set_tid; diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c index 2539b406618f..fa6ebc366ae9 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -615,7 +615,6 @@ linux_eventfd2(struct thread *td, struct linux_eventfd2_args *args) int linux_timerfd_create(struct thread *td, struct linux_timerfd_create_args *args) { - struct filedesc *fdp; struct timerfd *tfd; struct file *fp; clockid_t clockid; @@ -634,7 +633,6 @@ linux_timerfd_create(struct thread *td, struct linux_timerfd_create_args *args) if ((args->flags & LINUX_TFD_CLOEXEC) != 0) fflags |= O_CLOEXEC; - fdp = td->td_proc->p_fd; error = falloc(td, &fp, &fd, fflags); if (error != 0) return (error); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 5ae4051aaf38..589ad911266f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1087,7 +1087,6 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) siginfo_t siginfo; l_siginfo_t lsi; idtype_t idtype; - struct proc *p; int error; options = 0; @@ -1127,7 +1126,6 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) return (error); } if (args->info != NULL) { - p = td->td_proc; bzero(&lsi, sizeof(lsi)); if (td->td_retval[0] != 0) { sig = bsd_to_linux_signal(siginfo.si_signo); diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c index d7f12b782e96..af2ccc74ba12 100644 --- a/sys/compat/linux/linux_mmap.c +++ b/sys/compat/linux/linux_mmap.c @@ -83,14 +83,12 @@ linux_mmap_common(struct thread *td, uintptr_t addr, size_t len, int prot, struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; int bsd_flags, error; - struct file *fp; LINUX_CTR6(mmap2, "0x%lx, %ld, %ld, 0x%08lx, %ld, 0x%lx", addr, len, prot, flags, fd, pos); error = 0; bsd_flags = 0; - fp = NULL; /* * Linux mmap(2):