From nobody Mon Oct 03 23:11:23 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 4MhGmX1J63z4V1NT; Mon, 3 Oct 2022 23:11:24 +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 4MhGmW6KJ5z3QH0; Mon, 3 Oct 2022 23:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664838683; 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=rxPa31H7HH1M155qW50Oyfy8MqOFaj1eNQf7+jHpZmM=; b=Ft+gXMdf2eDfiffHwkzbAKEiBYdSQLZb164KL7pB+zJkHcrb/U5m3pLzdCQXOPE4foyRsr E7epPbacvtqtMiUBeji5CLfe0U/CIaQ8w3AMIhS6MZfXN5d9OjVvWhWLgkQz6h1ZFtHEHl 5ZTAVRjCsYGuz+rshyH416ikwOwcd+Dxp33BXUPAq8l1poL27oTvVpNFwjEObNu61ZWRwn 42KEHp6rPT4asc1hKVZsmKD13VvZz82VAdwkXGZo1KHk4GSKzV+JTpZZP+91bDZ5xfrpdj 2kwETWIUmfrp58jgmXyx3RcKhfHLooVZXISwM9V3DH7lrhJzjuoPp3W7Ux8sqA== 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 4MhGmW58rSzMmC; Mon, 3 Oct 2022 23:11:23 +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 293NBNat065649; Mon, 3 Oct 2022 23:11:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 293NBNBR065648; Mon, 3 Oct 2022 23:11:23 GMT (envelope-from git) Date: Mon, 3 Oct 2022 23:11:23 GMT Message-Id: <202210032311.293NBNBR065648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3b887005b4bb - main - rpc.lockd: Explicitly cast enum nlm_stats values to enum nlm4_stats. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b887005b4bb215e0e052ae81fe31c2c0d5f4f35 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664838683; 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=rxPa31H7HH1M155qW50Oyfy8MqOFaj1eNQf7+jHpZmM=; b=Y2Zjy65X6AOiGmoThq8ZbKC45ltuGkxx736SapJgvm0MS3xrtq1liD5ukZLuFTXgyjJpxF CtjzzKXKqrkcVmaJUasYQ5KllYdK/JddVZzWBuNlMGU6nHXRZVDFXpVFOLorPyDgWAO9Iy Th6qNqauI2UQXn93svN9fNQDuI54HA4pJBMpkVqK4Ms+n5x+rZeBTMwfcIfsJdCesbQ3BV uoO39XZNJ9TOyazmbuWRIvxpX+HWTxiHcZZt0uQf8CD0L7bBrPdAzuMfy7rqROIilcNBgJ 1EzB+HLRz2R9jLmIviWxOyNsnq+1djOZEJJg3IpFusvLcjSMmHSVYhw4eNYfRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664838683; a=rsa-sha256; cv=none; b=T6wa9lnOwUqQ6EfWZVmaeT2p1Z9sBZWQR9GhuUDFVXTUI7Ff7XXH0hYhk4VEPcXGOoJNZm hvzAMd3WxG2IFCzOp3iG6JS0Zwrww8DkkTw/nrm+3ZvPPx7W6RGl4YP5h/DQVkksCguYR9 TXXKrrKu0z6qHWd+qgtwoBYz1ZUTxD2y8xLUMtI7/cTGJ3yvopUxHfoexmYvfmxomJTz+o xhZf9+cHFYMZ4heCaXsyIZ8mvZOHc91HFmOQTrWmmuH/Z43BpIat7zTx8skmoH/gm78qMD taQUTFuDwB+yMxw4LSzhiIIplGWkF8iUZAlSvcxTt5fg8xuYxolBPR4aDXgKvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3b887005b4bb215e0e052ae81fe31c2c0d5f4f35 commit 3b887005b4bb215e0e052ae81fe31c2c0d5f4f35 Author: John Baldwin AuthorDate: 2022-10-03 23:10:42 +0000 Commit: John Baldwin CommitDate: 2022-10-03 23:10:42 +0000 rpc.lockd: Explicitly cast enum nlm_stats values to enum nlm4_stats. NLM 4 status values are a superset of the older NLM protocol so these casts are safe while pacifying -Wenum-conversion warnings from GCC. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D36816 --- usr.sbin/rpc.lockd/lock_proc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/rpc.lockd/lock_proc.c b/usr.sbin/rpc.lockd/lock_proc.c index 160e1844e5a8..395baf399832 100644 --- a/usr.sbin/rpc.lockd/lock_proc.c +++ b/usr.sbin/rpc.lockd/lock_proc.c @@ -999,7 +999,7 @@ nlm4_lock_4_svc(nlm4_lockargs *arg, struct svc_req *rqstp) /* copy cookie from arg to result. See comment in nlm_test_4() */ res.cookie = arg->cookie; - res.stat.stat = getlock(arg, rqstp, LOCK_MON | LOCK_V4); + res.stat.stat = (enum nlm4_stats)getlock(arg, rqstp, LOCK_MON | LOCK_V4); return (&res); } @@ -1012,7 +1012,7 @@ nlm4_lock_msg_4_svc(nlm4_lockargs *arg, struct svc_req *rqstp) log_from_addr("nlm4_lock_msg", rqstp); res.cookie = arg->cookie; - res.stat.stat = getlock(arg, rqstp, LOCK_MON | LOCK_ASYNC | LOCK_V4); + res.stat.stat = (enum nlm4_stats)getlock(arg, rqstp, LOCK_MON | LOCK_ASYNC | LOCK_V4); transmit4_result(NLM4_LOCK_RES, &res, getrpcaddr(rqstp)); return (NULL); @@ -1039,7 +1039,7 @@ nlm4_cancel_4_svc(nlm4_cancargs *arg, struct svc_req *rqstp) * Since at present we never return 'nlm_blocked', there can never be * a lock to cancel, so this call always fails. */ - res.stat.stat = unlock(&arg->alock, LOCK_CANCEL); + res.stat.stat = (enum nlm4_stats)unlock(&arg->alock, LOCK_CANCEL); return (&res); } @@ -1056,7 +1056,7 @@ nlm4_cancel_msg_4_svc(nlm4_cancargs *arg, struct svc_req *rqstp) * Since at present we never return 'nlm_blocked', there can never be * a lock to cancel, so this call always fails. */ - res.stat.stat = unlock(&arg->alock, LOCK_CANCEL | LOCK_V4); + res.stat.stat = (enum nlm4_stats)unlock(&arg->alock, LOCK_CANCEL | LOCK_V4); transmit4_result(NLM4_CANCEL_RES, &res, getrpcaddr(rqstp)); return (NULL); } @@ -1077,7 +1077,7 @@ nlm4_unlock_4_svc(nlm4_unlockargs *arg, struct svc_req *rqstp) if (debug_level) log_from_addr("nlm4_unlock", rqstp); - res.stat.stat = unlock(&arg->alock, LOCK_V4); + res.stat.stat = (enum nlm4_stats)unlock(&arg->alock, LOCK_V4); res.cookie = arg->cookie; return (&res); @@ -1091,7 +1091,7 @@ nlm4_unlock_msg_4_svc(nlm4_unlockargs *arg, struct svc_req *rqstp) if (debug_level) log_from_addr("nlm4_unlock_msg", rqstp); - res.stat.stat = unlock(&arg->alock, LOCK_V4); + res.stat.stat = (enum nlm4_stats)unlock(&arg->alock, LOCK_V4); res.cookie = arg->cookie; transmit4_result(NLM4_UNLOCK_RES, &res, getrpcaddr(rqstp));