From nobody Tue Jun 27 17:19:47 2023 X-Original-To: dev-commits-src-main@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 4QrBKc2Hzjz4f4cb; Tue, 27 Jun 2023 17:19: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 4QrBKc16r9z3Nhb; Tue, 27 Jun 2023 17:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886388; 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=RO+rdvGG+lgltzWO72pc/DdxbtPoqWZ0XQhmocN2OMk=; b=CCOsqBGzw7V4XMVxzPFqvRhXYmDsFwKgxc/KWEbNRDoLmimjXyL0WfP6pHVKMi6HoQqnsy obGEdjJQK/JuovW8CT7EMx7bul7jL4A38eR87R7s0w7IoLxL4aSSXgV3Ni45e3kxia8q8w eV/RWwsaW0aITo2us1TwM6NEuSNuQI2QUXlqD6NjkSntBDMuN03Ue++izykMcjFIt84bI0 y+k2wvK9hVbbv7nO8A3AKh87L/PJE4grpbPXuO/2rdDMklVmNGUxkuLUK+vrUEarQ49UYv /EqfShmKldMpe1qYBSmtdpHJRTStBv5vkzlvRRRKIeb1Oz+gx11Fu+574Q/Miw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886388; 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=RO+rdvGG+lgltzWO72pc/DdxbtPoqWZ0XQhmocN2OMk=; b=jZG590JZLujwtu9QioME/jd1+Ns+1C4aIDzcL3Zwgt2ElkUQo8GvmvWodmxrANqvsGMQ3a OXtB95/qoS+2sWM/RKEZ98HtyWfMXYKznzfYriOCeDQnDX7Jpa+XDzyOeOaaL9x4A4ip2h Yis8HHAUa0iE/B4BmUw3pAg9QFPWJnQ1SCr7QO6faFUUDRkGgcMBA8vtziJcHaKVwTsA7K czmmBqXyVAzkc4OEtNx1KTf2hWwrvAJNIqQdegSg2IG1/OTroI21+3f2gHfHtk+QK+OiNC RiUQ12FYv8yiVTxRq1FhfTUGPw6eA6fFxTSMORIlT9uyh7uUADNkdknI/ymhVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886388; a=rsa-sha256; cv=none; b=dXph8VDan3Yl3QJx6zRAocH63w2Ekl8UKgojVfTzEmDO5boIdds0lerwSY+3umS0U+VU2U yVzl3DiFQH55GwDRkzQid5vVxizZSgxHlSZW2F0hJskvfCe5I86pK4y6dK80KGftihDMsk ZFyeVxjiFTUfEp2YREpSoCTvcAB6/J/toRzY+RQYs4+5W4t/UMUkjXczTIT96/LuYwcCC6 3miODRRWiNV/rVkPdWXedGU7R9N/uZ5VBDDVTvhIxwBHJveYQz6648zU8CpQK4Roaqc6Rl CFOEHotdLfvW1agzdt8VPyV4qgzyCwDyWnBAUk8q1d6DO1TKUKMP3E8k+bZb1w== 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 4QrBKb6ml5z11FC; Tue, 27 Jun 2023 17:19: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 35RHJl8A006962; Tue, 27 Jun 2023 17:19:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJlqG006961; Tue, 27 Jun 2023 17:19:47 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:47 GMT Message-Id: <202306271719.35RHJlqG006961@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: eca9714e4bf2 - main - libbsnmptools: Fully comment out set but unused count variable. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: eca9714e4bf299cd704eb9e28a06a97d1bb1c301 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eca9714e4bf299cd704eb9e28a06a97d1bb1c301 commit eca9714e4bf299cd704eb9e28a06a97d1bb1c301 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 libbsnmptools: Fully comment out set but unused count variable. These functions all end with 'return (2/* count */);'. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40670 --- usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c index 9dc2f890ac7f..219be6f7209b 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c @@ -483,7 +483,7 @@ parse_ascii(char *ascii, uint8_t *binstr, size_t binlen) int32_t parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "proto", @@ -492,7 +492,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -530,7 +530,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -538,7 +538,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "proto", @@ -547,7 +547,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -583,7 +583,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -591,7 +591,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "context", @@ -600,7 +600,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -625,7 +625,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -633,7 +633,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt, saved_errno; + int32_t /* count, */ subopt, saved_errno; char *val, *option; const char *const subopts[] = { "engine", @@ -644,7 +644,7 @@ parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -697,7 +697,7 @@ parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); }