From nobody Tue Jun 27 17:19:43 2023 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 4QrBKW4hwfz4f4Zg; Tue, 27 Jun 2023 17:19:43 +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 4QrBKW44kVz3N8m; Tue, 27 Jun 2023 17:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886383; 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=6brNlkP4/+HAASbAIfqmbBuhzMLbR31FEAZyuGrZQCA=; b=jV1MbjY7ZBmosIKnp4oEvJkI9Yea+i9n7kCYAbIpydbmgCIM0c1Ez9kRTLMU9cp/3tOEg9 SOy/TjMuIU5eQ4mKqIQnEM1qCEmVy9/P/Qo7mY01ZBWdlgp/XE1AdyppCdgjL+VTpc8gvr N8KLYtnRN2tF/oOJ7KXj4yvWSSM29n4JwuYwYmQ40b9lS3uS49Gd9n1kEPV49ocx5B1+JS F6W54bnXaPrOu4rdHSjnZvIRWOkBnH39VzlgEIN8P1p7XR1bBkF1gZsw7kWfX+euFNulAJ BPA9HgI9DNySNqMl1fLmfdU/mMlXLzV2tnk8WX5upxKr9Jo+I4kzLo7PZx34eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886383; 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=6brNlkP4/+HAASbAIfqmbBuhzMLbR31FEAZyuGrZQCA=; b=n6lfbRL7wehFCeVh4a1Vr8OipU0avjFitoeXBcYrD20XX0IG0RkDwkhMITEU1cpPm/f0Ty ZyNzAytnh+MBeiyeIkDMvjzyx8Q96CGajULFKdMk84rBTKLL3s8hJdpxloCVXIdlKLQRLh Y8t6dbyK6I486tiW9TxfZDOnn3NcT2JmW2FzSLP8U26KU9k0P72cCcDh8jXKgQxCY6akHU 9QDLKQ9z1g+r63eQCjcT9YY+Mb6PcbK9pAAgQxTF+MEGCmw8RcH+2CK7n/8B84GMI57Se5 HoufFWA2kboHJ+wp4AXhUko1U/5ScuGarP683rKUXqx0QKbPHvTI7+aZCuJqMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886383; a=rsa-sha256; cv=none; b=xCgctLuY9UsBxUVNuuo6/65KVc0BWLPNxbOSxc3PmB1WaU7r1qvhX4DmZwXecS2yviCG4+ LPuLUAtsULqugSghJEK4NYtGI+E2Rkp/BbaDfJI4NqMUZN0rS4d3Oh+RdtqYbcEojp8fB3 4IzVYe85kCD0qIFZTPSZU/xGyfUhUfEi0YKfkrSpycxZf+TiNwPrGSJCDAj6yDIlJEhaT/ tYJaDHuXfdjs7kvv2m/gMd9gCmcq+BGRV3qE9OBG+uysyFys5ArBi4eD+cR/7ZoaVTDC2a +L1ewRMmKKyvecG+uO4Qu7hqNGUDVLJiZu/1p9xs+XVhBUy28E2TIpTESmjxOg== 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 4QrBKW37prz11FB; Tue, 27 Jun 2023 17:19:43 +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 35RHJhtm006877; Tue, 27 Jun 2023 17:19:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJh7s006876; Tue, 27 Jun 2023 17:19:43 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:43 GMT Message-Id: <202306271719.35RHJh7s006876@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: 32c7dde816fd - main - hyperv/kvp: Remove set but unused variables. 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: 32c7dde816fd1d738a48af82bf490307cb7b4739 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32c7dde816fd1d738a48af82bf490307cb7b4739 commit 32c7dde816fd1d738a48af82bf490307cb7b4739 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 hyperv/kvp: Remove set but unused variables. Reported by: GCC Reviewed by: Souradeep Chakrabarti Differential Revision: https://reviews.freebsd.org/D40660 --- contrib/hyperv/tools/hv_kvp_daemon.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/contrib/hyperv/tools/hv_kvp_daemon.c b/contrib/hyperv/tools/hv_kvp_daemon.c index 2770a8d6bc97..c111bb14ced8 100644 --- a/contrib/hyperv/tools/hv_kvp_daemon.c +++ b/contrib/hyperv/tools/hv_kvp_daemon.c @@ -193,7 +193,6 @@ static void kvp_update_file(int pool) { FILE *filep; - size_t bytes_written; kvp_acquire_lock(pool); @@ -204,7 +203,7 @@ kvp_update_file(int pool) exit(EXIT_FAILURE); } - bytes_written = fwrite(kvp_pools[pool].records, + fwrite(kvp_pools[pool].records, sizeof(struct kvp_record), kvp_pools[pool].num_records, filep); @@ -1217,11 +1216,9 @@ kvp_op_enumerate(struct hv_kvp_msg *op_msg, void *data __unused) char *key_name, *key_value; int error = 0; int op_pool; - int op; assert(op_msg != NULL); - op = op_msg->hdr.kvp_hdr.operation; op_pool = op_msg->hdr.kvp_hdr.pool; op_msg->hdr.error = HV_S_OK; @@ -1375,7 +1372,7 @@ main(int argc, char *argv[]) struct hv_kvp_msg *hv_kvp_dev_buf; struct hv_kvp_msg *hv_msg; struct pollfd hv_kvp_poll_fd[1]; - int op, pool; + int op; int hv_kvp_dev_fd, error, len, r; int ch; @@ -1488,11 +1485,10 @@ main(int argc, char *argv[]) /* * We will use the KVP header information to pass back * the error from this daemon. So, first save the op - * and pool info to local variables. + * to a local variable. */ op = hv_msg->hdr.kvp_hdr.operation; - pool = hv_msg->hdr.kvp_hdr.pool; if (op < 0 || op >= HV_KVP_OP_COUNT || kvp_op_hdlrs[op].kvp_op_exec == NULL) {