From nobody Fri Nov 11 18:36:47 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 4N86qh0nSBz4dbnN; Fri, 11 Nov 2022 18:36:48 +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 4N86qg5czBz3vpg; Fri, 11 Nov 2022 18:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191807; 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=9jholTbFo6GFAXwsRb576YL3okB7YCmLBoLJXwS4R24=; b=vsq6hc+9yuPE43UR+S3N8w1bbrzqnBrqozfvsTk4ayrjJav+Ua0QgJ+4rbsryyoOqnN9Z8 GwcIXKcT6HrAmmSsj7+QJwZe+8bBqOpDU2oLE7tC4/VmzN0OndYie8+HPSJ+9kGeWomFtP gZomxTwd67AA/Rs3bsiW5XjTWx7uLStqy7CA7UzqA1u1L2OBIQAG1jG6+I5sFDlNKEDyWB y2fj+d0RdoGPL5Cc0XxjXMocsN+fEpaVyOy0rKMucUY3tHPRR0j8DrVbiDcyHDUQljEc/W vAJZDITpcCGM/w+U9XzxaiaJsQbcJgf017sz+B1KvK7ApNHIaUJsvA8DdpcPgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191807; 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=9jholTbFo6GFAXwsRb576YL3okB7YCmLBoLJXwS4R24=; b=G36GK/8H/kCgZ3OHemgPx8fZuyLxNJQhMoHQiwvRQXck65kIU3YRZ/IT3oIcqtCAj0DBWB PFPU3DHN5SAN7w+tko7uQywh/lmO54FEvzxV/W14GHxJVrClxEeW//doL63iy0PZojN1mQ f2VO2OHS1V2v1S0m63oZOfP2aiaVscmrbMK7L69pwYukslLkeRpGlW4DiBKt1obew6n/BR Xq2HqkeWsVCRcyGFfUbapvLfcw/8LzT/m3T/nD9MsjRBVWbNjkMqWbXr8G9OVz+V3sVA6S xZFOezEZ1jUV+cVlxmWkmk57DZbI5XOp62sM3HFYVZZoVSWCSWQ8qk9VS2aezw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668191807; a=rsa-sha256; cv=none; b=Ip7Jl1184uo/euz9kWADd/1XUVu5w9JB0q4ONuEscaXxeUhZZ2l4a/Fodjsm4OqcaaY6dr Rxpn2KVecvXEWIGbN2blsBeDuCR8KkM2ipYJVadebraeKrzEiyry1f4VUOoEJ4l9juL2EY OTIjCSYhYYLLICw36K/VsA9IYHEqwNRZFSPFw0eGz9j4yIbJw8D63wIvLwHu/cmet5XSXb lVc2+YeMyXMXj9tJz0amHmuPfYvf7ggnx00EqkIKS7JeohfhjviMRrryW+f3auIULiWevi cEpmYJNgsfGpYK3ljU32ReirLkTB2BwJlFh3nco4g3ZV988OALGhAGJm5AS7SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N86qg4Knwzsql; Fri, 11 Nov 2022 18:36:47 +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 2ABIalj1004056; Fri, 11 Nov 2022 18:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABIalog004055; Fri, 11 Nov 2022 18:36:47 GMT (envelope-from git) Date: Fri, 11 Nov 2022 18:36:47 GMT Message-Id: <202211111836.2ABIalog004055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 598fbd36f1ef - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 598fbd36f1efc6fc322b78ad53d0c285a4e2e8d8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=598fbd36f1efc6fc322b78ad53d0c285a4e2e8d8 commit 598fbd36f1efc6fc322b78ad53d0c285a4e2e8d8 Author: John Baldwin AuthorDate: 2022-10-03 23:10:42 +0000 Commit: John Baldwin CommitDate: 2022-11-11 18:18:53 +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 (cherry picked from commit 3b887005b4bb215e0e052ae81fe31c2c0d5f4f35) --- 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));