From nobody Fri Jun 17 19:38:41 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E908F85B814; Fri, 17 Jun 2022 19:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPq8y48Ysz3QgR; Fri, 17 Jun 2022 19:38:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NcnhdRaL0BG1nOSrUJpKSEEdDv4S0zBCgl6jbBGOf0Y=; b=OZcHYrqPA3QkEgz/3CooG4im78+K/UPRX8O7l+B+d+kNM6Nr1SJnq5caVwNtZfzennmpsG BACTiufCEJT9erjhI4Wo+LgWkQiO2gVV3Md/8W7xNv8QszL1cC5upQVQTy848P0lyrCmw5 ce9EuiclZ0RDvby/FZvSr4WFfnYlAmBnCHShxvUksauRONc7Sh6EA6UzObKq4EppGHhdFo 1sji0EPfmq2yaU9WGZ5hr58jdi3hxs2LM3zzN4tW/BpXNbcXAUQ9zg40iwH+N0BAfGHypu V6Yiz+kQm1w1wP2EOzMBlASCRdRJxCoIj//S3m0Erj/tTF7TzjY1RU1RyfZGAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEAF525ACC; Fri, 17 Jun 2022 19:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJcf6U015025; Fri, 17 Jun 2022 19:38:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJcfVi015024; Fri, 17 Jun 2022 19:38:41 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:41 GMT Message-Id: <202206171938.25HJcfVi015024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 6a8133e32961 - stable/13 - linux: plug set-but-not-unused vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a8133e32961e7aeb9921f4a5ef49266ccb7693d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NcnhdRaL0BG1nOSrUJpKSEEdDv4S0zBCgl6jbBGOf0Y=; b=v3+h7nmzjLweuivjc1lcA7aPG9rE1Kv6DXPoj4tUMCON1rFp5KAbgCkBJWiO/RXOaPk4f/ 3mzPLQFPeNbnYPQRR0sci8s+HBNkSiKpcacjrHChwhBvWg9PBM75zL+Ww7Qeq5uBmLERGv gpA50C47KjI6jlu3xSURKSF3OlPcvSXbp+GIAjuu9F3qhK49njuObV8vF4Towz2jmAAJaD CARieYGobK7T0YQ8I6J4JpKGwyEOeKfh/5N5rS2ura/l+gtLUfE+n4D0Zt2peQU790C5YV wM2+n0w1I9GGlTfB2XjTcivKr53rlKurWM+yjDcb6t7iSx8Tx9i93tyujLwqjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494722; a=rsa-sha256; cv=none; b=vV1bz2FEv31NWRtzWN5tPSDtztXk+pUqByxDY+WuaO/jkStE3IC8LUW8MCymm8Ja1iqPfC t0DXgFDp5l2ZQxzKw8rOt0KCoRnECiXzIRq4bW4DWHGHrhBcDKD3ttIEfJ3CFG4kmJm1Zl k1Fza7mGpdsf2bUrZbBrAn4gVZpUgc5fbx9ZORyfPc3k2Z644YsAszTeMSYqoltrRHnzC4 Fo8MZE6DoMMEev1ddB6KiRRVXHL7zmOgd+w3gTCVSgV95uVX/W/m2Taj+87WjahGk02xGK NTgdOUZFrrhmeV9NQ5I+GiukRL//rBxnBZDHwRxkD4cJ115dDTF/uzU2GozNJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6a8133e32961e7aeb9921f4a5ef49266ccb7693d commit 6a8133e32961e7aeb9921f4a5ef49266ccb7693d Author: Mateusz Guzik AuthorDate: 2021-11-24 21:16:03 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:43 +0000 linux: plug set-but-not-unused vars Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 74a0e24f07974b4d51c57afa7525b5f88574ad31) --- 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 bb7ffd57be6e..eb132d97db4a 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -362,12 +362,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 331732eb4234..44b1a1526e3c 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 324708e9e3c7..f4a2d3bbde4b 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 f4655adcbb52..6d91bb575a62 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):