From nobody Tue Jun 20 16:29:26 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 4QlsXl1fVdz4gJFG; Tue, 20 Jun 2023 16:29:27 +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 4QlsXl0br5z4LKn; Tue, 20 Jun 2023 16:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687278567; 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=VuEE0ZjQhUqrHb5EIWC8jrPC2NLWBFwO+RDHAqqI3uQ=; b=WvdQdKFGEYU3DyCgvAFCv8c7XlC/p/rnHfRAgNTH82ttUgBm/cXWSpqWw+ZPhvR+FUd8T7 kLJdlowbKCi/gkQXR7vFh8uyT6jhBhSKgu4Hl2FwWZxRmCwVr2FTvwd6P1laZ3uNW5jG5A rconzU1dKHYoeNzNgN8DczIaBdnaUbrDK79aPJp8msZEI8jclP57ApLorZebT/1IuGu9M+ YwGn49NKHogjH2mLvGrNYU8bLT3KfdyqsMImlrgZknoCDm34jPxXpLu+/qxc4o2aEFuGQW YFR0e62bWwP5eXJzCy0PYCs5Wzg42EvXFPxI63Abv/MlwMa0dR5WNDm5kULwhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687278567; 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=VuEE0ZjQhUqrHb5EIWC8jrPC2NLWBFwO+RDHAqqI3uQ=; b=Q+dy7HQkPYi1maXYymms+R2EVeqpSO58DILwIz58NmpzNkFxtFmhBp6B5PAn1zhSMAvol2 Qs9zIov9g7GmF1GYVWrVglFD+6qAOdXB8C+Vgtj/0njofBKLA2ZhdqRrmNAFdHX0zpJyx/ YwM0BJSI4nyiaXCoZGa9r3tKMHM398SnQY8Z/Y9vpjJDjNTu62+JMnVH540J0UzigrOgaE 5aznYSw0/8t/bD4ewOYoYdVjynvfIwBH/kURDNSe3n1hwh12nxbvCQu2Iz9v53BzltcV8c tMw5C2ke2+Bo2MPMgYbccJ7yacNsBMQreU7tb8/Rc2zpTdiTAYXPp/82JkiLiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687278567; a=rsa-sha256; cv=none; b=Uzd6EUHTm1TrndYYjwoKtel/3I2rzDwaSSYHKDyhEZCXkPxHyzIaLy+eNtyKnzRMUeZqQl aSMmGrw2cBXOo9ROkHyRBUvP4tdRWgEQ/U3YpJwH4bXLRE0PNZODrDTTShCTnw9rYQojwG EQzK+CMZ3ST8QvVb6OCM59wjUav0p0d9k2M2nbGDtB84JSAVV89d0YSzP0OEy/1MuqrRex NlHE4exYMkHZj1XeGQ7VSGwhBcd4PoRhQfEVSeSkoqVV62ke3NZzFjJtY0k9qbNDoC5SBN 5U4vkhUrB0xS6juUO6pE0CWxfUd7vry3wUw20cYqLNAS7waQHzPh/3z8FhG2gA== 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 4QlsXk6ksHz15hy; Tue, 20 Jun 2023 16:29:26 +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 35KGTQss045243; Tue, 20 Jun 2023 16:29:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35KGTQ5m045242; Tue, 20 Jun 2023 16:29:26 GMT (envelope-from git) Date: Tue, 20 Jun 2023 16:29:26 GMT Message-Id: <202306201629.35KGTQ5m045242@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: 8457b7f426b0 - main - ypldap: 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: 8457b7f426b074a2eb93002fc9d2268690a3cf32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8457b7f426b074a2eb93002fc9d2268690a3cf32 commit 8457b7f426b074a2eb93002fc9d2268690a3cf32 Author: John Baldwin AuthorDate: 2023-06-20 16:29:00 +0000 Commit: John Baldwin CommitDate: 2023-06-20 16:29:00 +0000 ypldap: Remove set but unused variables. Some of these were reported by GCC, others reported by clang. --- usr.sbin/ypldap/entries.c | 5 ----- usr.sbin/ypldap/ldapclient.c | 4 ++-- usr.sbin/ypldap/yp.c | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/usr.sbin/ypldap/entries.c b/usr.sbin/ypldap/entries.c index 1d57d5cd7b05..9176e9ba1862 100644 --- a/usr.sbin/ypldap/entries.c +++ b/usr.sbin/ypldap/entries.c @@ -40,7 +40,6 @@ void flatten_entries(struct env *env) { - size_t wrlen; size_t len; char *linep; char *endp; @@ -56,7 +55,6 @@ flatten_entries(struct env *env) * * An extra octet is alloced to make space for an additional NUL. */ - wrlen = env->sc_user_line_len; if ((linep = calloc(1, env->sc_user_line_len + 1)) == NULL) { /* * XXX: try allocating a smaller chunk of memory @@ -78,7 +76,6 @@ flatten_entries(struct env *env) free(ue->ue_line); ue->ue_line = endp; endp += len; - wrlen -= len; /* * To save memory strdup(3) the netid_line which originally used @@ -94,7 +91,6 @@ flatten_entries(struct env *env) env->sc_user_lines = linep; log_debug("done pushing users"); - wrlen = env->sc_group_line_len; if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) { /* * XXX: try allocating a smaller chunk of memory @@ -115,7 +111,6 @@ flatten_entries(struct env *env) free(ge->ge_line); ge->ge_line = endp; endp += len; - wrlen -= len; } env->sc_group_lines = linep; log_debug("done pushing groups"); diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c index 5f446a6f847e..fbd6fcd3dc65 100644 --- a/usr.sbin/ypldap/ldapclient.c +++ b/usr.sbin/ypldap/ldapclient.c @@ -346,7 +346,7 @@ client_shutdown(void) pid_t ldapclient(int pipe_main2client[2]) { - pid_t pid, dns_pid; + pid_t pid; int pipe_dns[2]; struct passwd *pw; struct event ev_sigint; @@ -371,7 +371,7 @@ ldapclient(int pipe_main2client[2]) if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1) fatal("socketpair"); - dns_pid = ypldap_dns(pipe_dns, pw); + ypldap_dns(pipe_dns, pw); close(pipe_dns[1]); #ifndef DEBUG diff --git a/usr.sbin/ypldap/yp.c b/usr.sbin/ypldap/yp.c index 0cbadc371c5e..cfaea38f76c4 100644 --- a/usr.sbin/ypldap/yp.c +++ b/usr.sbin/ypldap/yp.c @@ -268,9 +268,6 @@ yp_dispatch(struct svc_req *req, SVCXPRT *trans) int yp_check(struct svc_req *req) { - struct sockaddr_in *caller; - - caller = svc_getcaller(req->rq_xprt); /* * We might want to know who we allow here. */